import torch _ = torch.manual_seed(42) from torchmetrics.image import SpectralDistortionIndex preds = torch.rand([16, 3, 16, 16]) target = torch.rand([16, 3, 16, 16]) metric = SpectralDistortionIndex() metric.update(preds, target) fig_, ax_ = metric.plot()