Skip to content
This repository was archived by the owner on Oct 3, 2024. It is now read-only.

Commit dd12ecc

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent f4fb1ac commit dd12ecc

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

pseudo_labeller/model/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
"""Models"""
2+
23
from pseudo_labeller.model.idam import PsuedoIrradienceForecastor

pseudo_labeller/model/idam.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Psuedo-irradience forecastor/labeller"""
2+
23
import einops
34
import torch
45
import torch.nn as nn
@@ -68,7 +69,7 @@ def __init__(
6869
in_channels=input_channels,
6970
out_channels=conv3d_channels,
7071
kernel_size=(kernel_size, kernel_size, kernel_size),
71-
padding=(1,0,0),
72+
padding=(1, 0, 0),
7273
)
7374
)
7475
for i in range(0, num_layers):
@@ -77,7 +78,7 @@ def __init__(
7778
in_channels=conv3d_channels,
7879
out_channels=conv3d_channels,
7980
kernel_size=(kernel_size, kernel_size, kernel_size),
80-
padding=(1,0,0),
81+
padding=(1, 0, 0),
8182
)
8283
)
8384

@@ -95,9 +96,7 @@ def __init__(
9596
# Small head model to convert from latent space to PV generation for training
9697
# Input is per-pixel input data, this will be
9798
# reshaped to the same output steps as the latent head
98-
self.pv_meta_input = nn.Linear(
99-
pv_meta_input_channels, out_features=hidden_dim
100-
)
99+
self.pv_meta_input = nn.Linear(pv_meta_input_channels, out_features=hidden_dim)
101100

102101
# Output is forecast steps channels, each channel is a timestep
103102
# For labelling, this should be 1, forecasting the middle
@@ -142,7 +141,5 @@ def forward(self, x: torch.Tensor, pv_meta: torch.Tensor = None, output_latents:
142141
x = torch.cat([x, pv_meta], dim=1)
143142
# Get pv_meta_output
144143
x = self.pv_meta_output(x)
145-
x = F.relu(
146-
self.pv_meta_output2(x)
147-
) # Generation can only be positive or 0, so ReLU
144+
x = F.relu(self.pv_meta_output2(x)) # Generation can only be positive or 0, so ReLU
148145
return x

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
""" Usual setup file for package """
2+
23
# read the contents of your README file
34
from pathlib import Path
45

0 commit comments

Comments
 (0)