import torch from torchmetrics.image import StructuralSimilarityIndexMeasure preds = torch.rand([3, 3, 256, 256]) target = preds * 0.75 metric = StructuralSimilarityIndexMeasure(data_range=1.0) metric.update(preds, target) fig_, ax_ = metric.plot()