This message was deleted.
# neural-forecast
s
This message was deleted.
j
Hey. Yes, that column refers to the validation loss at the end of the training for each trial
f
@José Morales thanks! Do you how I can get the same thing out of the regular NHiTS? So when I don't use the Auto version, how can I retrieve the loss after nf.fit()? The regular NHiTS doesn't have a
results
attribute so
nf.models[0].results
doesn't work and I can't figure out where it saves the loss values after fitting is finished.
j
I think you can retrieve them with
nf.models[0].trainer.callback_metrics
👍 1
f
@José Morales thanks a lot! 🙏
j
Ah sorry, I think that's also for the auto models
f
Ah OK. Thanks for mentioning it.
j
Haha, sorry again. It does work for the regular NHITS:
Copy code
from neuralforecast.core import NeuralForecast
from neuralforecast.models import NHITS
from neuralforecast.utils import AirPassengersPanel

model = NHITS(h=12, input_size=24, max_steps=5)
nf = NeuralForecast(models=[model], freq='M')
nf.fit(AirPassengersPanel, val_size=12)
nf.models[0].trainer.callback_metrics
yields
Copy code
{'train_loss': tensor(55.4308),
 'train_loss_step': tensor(55.4308),
 'train_loss_epoch': tensor(55.4308),
 'valid_loss': tensor(91.5336),
 'ptl/val_loss': tensor(91.5336)}
❤️ 1
valid_loss and ptl/valid_loss are the same (validation loss at the end of training)
f
@José Morales thanks a lot. Sorry I didn't get to check since I'm away from my laptop. Thanks for checking it. I'll try it later when I get back.
👍 1
🙌 1
m
Good to see you again @Farzad E 🙂
❤️ 1