Skip to content

Instantly share code, notes, and snippets.

@justusschock
Last active June 21, 2020 12:18
Show Gist options
  • Select an option

  • Save justusschock/d1a68b20964dbfa09b0bad5c87a322c1 to your computer and use it in GitHub Desktop.

Select an option

Save justusschock/d1a68b20964dbfa09b0bad5c87a322c1 to your computer and use it in GitHub Desktop.
Plain functional example of a metric (RMSE)
import torch
def rmse(pred: torch.Tensor, target: torch.Tensor) -> torch.Tensor:
return torch.sqrt(torch.mean(torch.pow(pred-target, 2.0)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment