You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sometimes we want to compare model with weight to without weight, but, because the val metric is multiple weight, this multiplication make models cannot be compared.
you can change code below:
file: pytorch_forecasting/models/base_model.py , line 665:
def validation_step(self, batch, batch_idx):
x, y = batch
if y[1] is not None:
weight = torch.where(y[1]!=1.0, torch.tensor(1.0), y[1])
y = (y[0], weight)
log, out = self.step(x, y, batch_idx)
log.update(self.create_log(x, y, out, batch_idx))
self.validation_step_outputs.append(log)
return log
The text was updated successfully, but these errors were encountered:
fkiraly
changed the title
compare models with and without weight
[ENH] compare models with and without weight
Sep 13, 2024
sometimes we want to compare model with weight to without weight, but, because the val metric is multiple weight, this multiplication make models cannot be compared.
you can change code below:
file: pytorch_forecasting/models/base_model.py , line 665:
The text was updated successfully, but these errors were encountered: