Last active
June 21, 2020 12:18
-
-
Save justusschock/d1a68b20964dbfa09b0bad5c87a322c1 to your computer and use it in GitHub Desktop.
Plain functional example of a metric (RMSE)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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