Skip to content

Instantly share code, notes, and snippets.

@enochkan
Last active November 4, 2020 05:17
Show Gist options
  • Save enochkan/331e8a521fce6f8797f6c175796baf5e to your computer and use it in GitHub Desktop.
Save enochkan/331e8a521fce6f8797f6c175796baf5e to your computer and use it in GitHub Desktop.
torch-metrics
from torch_metrics import MSEMetric, MAEMetric, RSquaredMetric
import torch
metric = MSEMetric()
t1 = torch.tensor([1., 2., 3.])
t2 = torch.tensor([1., 5., 25.])
print(metric(t1, t2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment