zalandoresearch / pytorch-ts

PyTorch based Probabilistic Time Series forecasting framework based on GluonTS backend
MIT License
1.24k stars 191 forks source link

Error in diffusion model? #102

Open hjalmarlucius opened 2 years ago

hjalmarlucius commented 2 years ago

https://github.com/zalandoresearch/pytorch-ts/blob/62a18cfd0f19fc2247fc7e79e77f44b8dab6c4c9/pts/modules/gaussian_diffusion.py#L248

The loss function returns the aggregate mean scalar rather than the elementwise losses (https://pytorch.org/docs/stable/generated/torch.nn.functional.l1_loss.html). I think the TimeGrad model assumes it receives elementwise losses as it tries to weigh them.

kashif commented 2 years ago

hmm let me see...