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 computing the Pearson Correlation Coefficient with input cuda tensors (prediction and target), an error is raised because some default values (mean_x, mean_y) are initialized as torch.tensors (on the cpu).
As described here in the documentation each metric object is a nn.Module and therefore should be moved to the same device as input. Your example therefore works if we move the metric to gpu:
When computing the Pearson Correlation Coefficient with input cuda tensors (prediction and target), an error is raised because some default values (
mean_x
,mean_y
) are initialized as torch.tensors (on the cpu).Example:
Output:
Versions:
torchmetrics: 0.8.2
python3.9
The text was updated successfully, but these errors were encountered: