Download scripts/result.py from OneScience-Group/NNCAM-Stable: direct link, hf CLI and curl.
- Browser
- Download file 490 Bytes
-
https://huggingface.co/OneScience-Group/NNCAM-Stable/resolve/main/scripts/result.py
- Command line
-
hf download hf://OneScience-Group/NNCAM-Stable/scripts/result.py
-
curl -L -o result.py https://huggingface.co/OneScience-Group/NNCAM-Stable/resolve/main/scripts/result.py
490 Bytes
| from pathlib import Path | |
| import sys,numpy as np,matplotlib;matplotlib.use('Agg');import matplotlib.pyplot as plt;R=Path(__file__).resolve().parents[1];sys.path.insert(0,str(R));from model.nncam_stable import * | |
| c=cfg(R);d=np.load(R/c['paths']['predictions']);rmse=float(np.sqrt(np.mean((d['prediction']-d['target'])**2)));write(R/c['paths']['evaluation'],{'rmse':rmse});plt.plot(d['prediction'][0]);p=R/c['paths']['figure'];p.parent.mkdir(parents=True,exist_ok=True);plt.savefig(p);print(p) | |