Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/jacob/windnet' into jacob/windnet
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobbieker committed Feb 6, 2024
2 parents f7aabcd + d781282 commit c501dd2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pvnet/models/multimodal/encoders/encoders3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,14 @@ def __init__(
padding = (padding, padding, padding)
# Check that the output shape of the convolutional layers will be at least 1x1
cnn_spatial_output_size = (
image_size_pixels - ((spatial_kernel_size - 2 * padding[1]) - 1) * number_of_conv3d_layers
image_size_pixels
- ((spatial_kernel_size - 2 * padding[1]) - 1) * number_of_conv3d_layers
)
# size of 3, goes down by 2 each layer, but a padding of 2 means it doesn't
cnn_sequence_length = sequence_length - ((temporal_kernel_size - 2 * padding[0]) - 1) * number_of_conv3d_layers
cnn_sequence_length = (
sequence_length
- ((temporal_kernel_size - 2 * padding[0]) - 1) * number_of_conv3d_layers
)
if not (cnn_spatial_output_size >= 1):
raise ValueError(
f"cannot use this many conv3d layers ({number_of_conv3d_layers}) with this input "
Expand Down

0 comments on commit c501dd2

Please sign in to comment.