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
Traceback (most recent call last):
File "test.py", line 10, in <module>
torchmetrics.functional.mean_squared_error(x, y, num_outputs=H * W)
File "lib/python3.10/site-packages/torchmetrics/functional/regression/mse.py", line 84, in mean_squared_error
sum_squared_error, n_obs = _mean_squared_error_update(preds, target, num_outputs=num_outputs)
File "lib/python3.10/site-packages/torchmetrics/functional/regression/mse.py", line 35, in _mean_squared_error_update
_check_data_shape_to_num_outputs(preds, target, num_outputs, allow_1d_reshape=True)
File "lib/python3.10/site-packages/torchmetrics/functional/regression/utils.py", line 31, in _check_data_shape_to_num_outputs
raise ValueError(
ValueError: Expected both predictions and target to be either 1- or 2-dimensional tensors, but got 3 and 3.
Expected behavior
I would expect the MSE metrics to support pixelwise regression (predicting a single regression value for each pixel in an image). The above script works fine with torchmetrics 1.0.3.
🐛 Bug
#1937 introduces an unintended consequence: pixelwise regression is no longer supported.
To Reproduce
Run the following script:
This results in the following error msg:
Expected behavior
I would expect the MSE metrics to support pixelwise regression (predicting a single regression value for each pixel in an image). The above script works fine with torchmetrics 1.0.3.
Environment
Additional context
@SkafteNicki @Borda @justusschock
The text was updated successfully, but these errors were encountered: