Skip to content

Commit

Permalink
Add missing +1
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobbieker committed Feb 6, 2024
1 parent a712a61 commit 251a0af
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pvnet/models/multimodal/multimodal.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def __init__(
pv_interval_minutes: int = 5,
sat_interval_minutes: int = 5,
sensor_interval_minutes: int = 30,
wind_interval_minutes: int = 15,
image_embedding_dim: Optional[int] = 318,
timestep_intervals_to_plot: Optional[list[int]] = None,
):
Expand Down Expand Up @@ -107,6 +108,7 @@ def __init__(
optimizer: Optimizer factory function used for network.
target_key: The key of the target variable in the batch.
interval_minutes: The interval between each sample of the target data
wind_interval_minutes: The interval between each sample of the wind data
wind_encoder: Encoder for wind data
wind_history_minutes: Length of recent wind data used as input.
pv_interval_minutes: The interval between each sample of the PV data
Expand Down Expand Up @@ -204,7 +206,7 @@ def __init__(
assert pv_history_minutes is not None

self.pv_encoder = pv_encoder(
sequence_length=pv_history_minutes // pv_interval_minutes,
sequence_length=pv_history_minutes // pv_interval_minutes + 1,
)

# Update num features
Expand All @@ -215,7 +217,7 @@ def __init__(
wind_history_minutes = history_minutes

self.wind_encoder = wind_encoder(
sequence_length=wind_history_minutes // interval_minutes
sequence_length=wind_history_minutes // wind_interval_minutes + 1
)

# Update num features
Expand All @@ -226,7 +228,7 @@ def __init__(
sensor_history_minutes = history_minutes

self.sensor_encoder = sensor_encoder(
sequence_length=sensor_history_minutes // sensor_interval_minutes
sequence_length=sensor_history_minutes // sensor_interval_minutes + 1
)

# Update num features
Expand Down

0 comments on commit 251a0af

Please sign in to comment.