passalis / dain

Deep Adaptive Input Normalization for Time Series Forecasting
123 stars 32 forks source link

lob_epoch_trainer tiny bug #1

Open alfredyuan opened 4 years ago

alfredyuan commented 4 years ago

In line 39 of train_utils.py

It should be:

loss = (train_loss / counter ).cpu().data.numpy()

otherwise train_loss is not used and loss seems to be a pretty small number.

Can you please double check?

breznak commented 4 years ago

This could be closed as it seems to be correct in the current code:

    loss = (loss / counter).cpu().data.numpy()
    return loss

Thanks for providing the solution!