You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When passing a single sample at a time to the PearsonCorrcoef metric it will crash. I am not sure if this is the intended behavior but it causes problems for big models training with batch size of one.
1.8.0
0.3.2
/shared/raimis/opt/miniconda/envs/tmp/lib/python3.8/site-packages/torchmetrics/utilities/prints.py:36: UserWarning: Metric `PearsonCorrcoef` will save all targets and predictions in buffer. For large datasets this may lead to large memory footprint.
warnings.warn(*args, **kwargs)
Traceback (most recent call last):
File "bug.py", line 12, in <module>
correlation.compute()
File "/shared/raimis/opt/miniconda/envs/tmp/lib/python3.8/site-packages/torchmetrics/metric.py", line 251, in wrapped_func
self._computed = compute(*args, **kwargs)
File "/shared/raimis/opt/miniconda/envs/tmp/lib/python3.8/site-packages/torchmetrics/regression/pearson.py", line 95, in compute
preds = torch.cat(self.preds, dim=0)
RuntimeError: zero-dimensional tensor (at position 0) cannot be concatenated
🐛 Bug
When passing a single sample at a time to the
PearsonCorrcoef
metric it will crash. I am not sure if this is the intended behavior but it causes problems for big models training with batch size of one.To Reproduce
Error Message:
RuntimeError: zero-dimensional tensor (at position 0) cannot be concatenated
The text was updated successfully, but these errors were encountered: