Download examples/AutoPower_IEEE39_bus/AdaptiveHierarchicalGraphTransformer/metrics.py from InternScience/InternAgent: direct link, hf CLI and curl.
- Browser
- Download file 172 Bytes
-
https://huggingface.co/InternScience/InternAgent/resolve/main/examples/AutoPower_IEEE39_bus/AdaptiveHierarchicalGraphTransformer/metrics.py
- Command line
-
hf download hf://InternScience/InternAgent/examples/AutoPower_IEEE39_bus/AdaptiveHierarchicalGraphTransformer/metrics.py
-
curl -L -o metrics.py https://huggingface.co/InternScience/InternAgent/resolve/main/examples/AutoPower_IEEE39_bus/AdaptiveHierarchicalGraphTransformer/metrics.py
172 Bytes
| import torch | |
| import torch.nn as nn | |
| def RMSE(predictions, targets): | |
| mse_eval = nn.MSELoss() | |
| rmse = torch.sqrt(mse_eval(predictions, targets)).item() | |
| return rmse |