Total Variation (TV)¶ Module Interface¶ torchmetrics.TotalVariation[source] alias of torchmetrics.image._deprecated._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) >>> _total_variation(img) tensor(7546.8018) Return type Tensor