Skip to content

Commit

Permalink
Debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobbieker committed Dec 5, 2023
1 parent 169cd80 commit 66de58b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pvnet/models/base_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,10 @@ def _calculate_val_losses(self, y, y_hat):

# Take median value for remaining metric calculations
y_hat = self._quantiles_to_prediction(y_hat)
print(f"{y_hat.shape=}, {y.shape=}")
common_metrics_each_step = common_metrics(predictions=y_hat.numpy(), target=y.numpy())
# print(f"{y_hat.shape=}, {y.shape=}")
common_metrics_each_step = {"mae": torch.mean(torch.abs(y_hat - y), dim=0),
"rmse": torch.sqrt(torch.mean((y_hat - y) ** 2, dim=0))}
# common_metrics_each_step = common_metrics(predictions=y_hat.numpy(), target=y.numpy())
mse_each_step = common_metrics_each_step["rmse"] ** 2
mae_each_step = common_metrics_each_step["mae"]

Expand Down

0 comments on commit 66de58b

Please sign in to comment.