pytorch-forecasting icon indicating copy to clipboard operation
pytorch-forecasting copied to clipboard

Bugfix: handle case where 'losses' is a list of tensors

Open TeodorChiaburu opened this issue 1 year ago • 1 comments

Description

This PR fixes an issue I came across when applying NHiTS and TFT on my use case, namely that losses can be tensors within a list. In that case, the function mask_losses will fail. It is just a one-liner in base_metrics.py.

TeodorChiaburu avatar Aug 04 '23 07:08 TeodorChiaburu

BTW: Would be great to have a test for this!

jdb78 avatar Sep 10 '23 21:09 jdb78