Skip to content

Commit

Permalink
Move image gradient (#381)
Browse files Browse the repository at this point in the history
* move

* format

* docs

* chlog

Co-authored-by: Jirka <jirka.borovec@seznam.cz>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Jul 16, 2021
1 parent d6cb082 commit 393a391
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 27 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Moved `psnr` and `ssim` from `torchmetrics.functional.regression.*` to `torchmetrics.functional.image.*` ([#382](https://github.com/PyTorchLightning/metrics/pull/382)):
- Moved `psnr` and `ssim` from `torchmetrics.functional.regression.*` to `torchmetrics.functional.image.*` ([#382](https://github.com/PyTorchLightning/metrics/pull/382))


- Moved `image_gradient` from `torchmetrics.functional.image_gradients` to `torchmetrics.functional.image.gradients` ([#381](https://github.com/PyTorchLightning/metrics/pull/381))


### Deprecated
Expand Down
48 changes: 23 additions & 25 deletions docs/source/references/functional.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,6 @@ snr [func]
.. autofunction:: torchmetrics.functional.snr
:noindex:

*************
Image Metrics
*************


psnr [func]
~~~~~~~~~~~

.. autofunction:: torchmetrics.functional.psnr
:noindex:


ssim [func]
~~~~~~~~~~~

.. autofunction:: torchmetrics.functional.ssim
:noindex:


**********************
Classification Metrics
Expand Down Expand Up @@ -211,6 +193,29 @@ to_onehot [func]
.. autofunction:: torchmetrics.utilities.data.to_onehot
:noindex:

*************
Image Metrics
*************

image_gradients [func]
~~~~~~~~~~~~~~~~~~~~~~

.. autofunction:: torchmetrics.functional.image_gradients
:noindex:


psnr [func]
~~~~~~~~~~~

.. autofunction:: torchmetrics.functional.psnr
:noindex:


ssim [func]
~~~~~~~~~~~

.. autofunction:: torchmetrics.functional.ssim
:noindex:

******************
Regression Metrics
Expand All @@ -230,13 +235,6 @@ explained_variance [func]
:noindex:


image_gradients [func]
~~~~~~~~~~~~~~~~~~~~~~

.. autofunction:: torchmetrics.functional.image_gradients
:noindex:


mean_absolute_error [func]
~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
2 changes: 1 addition & 1 deletion torchmetrics/functional/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
from torchmetrics.functional.classification.roc import roc # noqa: F401
from torchmetrics.functional.classification.specificity import specificity # noqa: F401
from torchmetrics.functional.classification.stat_scores import stat_scores # noqa: F401
from torchmetrics.functional.image.gradients import image_gradients # noqa: F401
from torchmetrics.functional.image.psnr import psnr # noqa: F401
from torchmetrics.functional.image.ssim import ssim # noqa: F401
from torchmetrics.functional.image_gradients import image_gradients # noqa: F401
from torchmetrics.functional.nlp import bleu_score # noqa: F401
from torchmetrics.functional.regression.cosine_similarity import cosine_similarity # noqa: F401
from torchmetrics.functional.regression.explained_variance import explained_variance # noqa: F401
Expand Down
1 change: 1 addition & 0 deletions torchmetrics/functional/image/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from torchmetrics.functional.image.gradients import image_gradients # noqa: F401
from torchmetrics.functional.image.psnr import psnr # noqa: F401
File renamed without changes.

0 comments on commit 393a391

Please sign in to comment.