Skip to content

Commit

Permalink
Fix support for pixelwise MSE (#2017)
Browse files Browse the repository at this point in the history
* Fix support for pixelwise MSE

* Remove unused import

* changelog

---------

Co-authored-by: Nicki Skafte Detlefsen <[email protected]>
  • Loading branch information
adamjstewart and SkafteNicki authored Aug 23, 2023
1 parent f6760b5 commit 42c748b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

-
- Fixed support for pixelwise MSE ([#2017](https://github.com/Lightning-AI/torchmetrics/pull/2017)


## [1.1.0] - 2023-08-22
Expand Down
2 changes: 0 additions & 2 deletions src/torchmetrics/functional/regression/mse.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import torch
from torch import Tensor

from torchmetrics.functional.regression.utils import _check_data_shape_to_num_outputs
from torchmetrics.utilities.checks import _check_same_shape


Expand All @@ -32,7 +31,6 @@ def _mean_squared_error_update(preds: Tensor, target: Tensor, num_outputs: int)
"""
_check_same_shape(preds, target)
_check_data_shape_to_num_outputs(preds, target, num_outputs, allow_1d_reshape=True)
if num_outputs == 1:
preds = preds.view(-1)
target = target.view(-1)
Expand Down

0 comments on commit 42c748b

Please sign in to comment.