import torch from torchmetrics.image import UniversalImageQualityIndex preds = torch.rand([16, 1, 16, 16]) target = preds * 0.75 metric = UniversalImageQualityIndex() metric.update(preds, target) fig_, ax_ = metric.plot()