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 Dec 5, 2023
2 parents 256f43f + 56dbdba commit df5281d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pvnet/models/base_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ def _training_accumulate_log(self, batch, batch_idx, losses, y_hat):
def training_step(self, batch, batch_idx):
"""Run training step"""
y_hat = self(batch)
y = batch[self._target_key][:,0, -self.forecast_len_30 :]
y = batch[self._target_key][:, 0, -self.forecast_len_30 :]

losses = self._calculate_common_losses(y, y_hat)
losses = {f"{k}/train": v for k, v in losses.items()}
Expand All @@ -454,7 +454,7 @@ def validation_step(self, batch: dict, batch_idx):
print(f"{batch[self._target_key][:, -self.forecast_len_30 :, 0].shape=}")
print(f"{self.forecast_len_30=}")
# Sensor seems to be in batch, station, time order
y = batch[self._target_key][:,0, -self.forecast_len_30 :]
y = batch[self._target_key][:, 0, -self.forecast_len_30 :]

losses = self._calculate_common_losses(y, y_hat)
losses.update(self._calculate_val_losses(y, y_hat))
Expand Down

0 comments on commit df5281d

Please sign in to comment.