From 1b5283f0b3441d3184dfb34037652b08f325a04a Mon Sep 17 00:00:00 2001 From: James Fulton Date: Mon, 15 Apr 2024 09:33:27 +0000 Subject: [PATCH] fix the horizon graph training on GPU --- pvnet/models/base_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pvnet/models/base_model.py b/pvnet/models/base_model.py index 7d4a61a1..459337b2 100644 --- a/pvnet/models/base_model.py +++ b/pvnet/models/base_model.py @@ -521,7 +521,7 @@ def validation_step(self, batch: dict, batch_idx): # Store these to make horizon accuracy plot self._horizon_maes.append( - {i: losses[f"MAE_horizon/step_{i:03}"] for i in range(self.forecast_len)} + {i: losses[f"MAE_horizon/step_{i:03}"].cpu().numpy() for i in range(self.forecast_len)} ) logged_losses = {f"{k}/val": v for k, v in losses.items()}