pytorch-forecasting
pytorch-forecasting copied to clipboard
Bugfix: handle case where 'losses' is a list of tensors
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.
BTW: Would be great to have a test for this!