from torch import randn from torchmetrics.regression import LogCoshError metric = LogCoshError() values = [] for _ in range(10): values.append(metric(randn(10,), randn(10,))) fig, ax = metric.plot(values)