11"""Psuedo-irradience forecastor/labeller"""
2+
23import einops
34import torch
45import 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
0 commit comments