Total Variation (TV)¶
Module Interface¶
- torchmetrics.TotalVariation[source]
alias of
_TotalVariation
Functional Interface¶
- torchmetrics.functional.total_variation(img, reduction='sum')[source]
Wrapper for deprecated import.
>>> import torch >>> _ = torch.manual_seed(42) >>> img = torch.rand(5, 3, 28, 28) :rtype: :py:class:`~torch.Tensor`
>>> _total_variation(img) tensor(7546.8018)