NNCAM-Stable / scripts /fake_data.py
zhangrenchao's picture
Publish NNCAM-Stable reproduction
109b0dc verified
Raw
History Blame Contribute Delete
323 Bytes
from pathlib import Path
import numpy as np,yaml;R=Path(__file__).resolve().parents[1];c=yaml.safe_load((R/'conf/config.yaml').read_text());g=np.random.default_rng(2);x=g.normal(size=(128,122)).astype('f');y=x[:,:68]*.2;p=R/c['data']['path'];p.parent.mkdir(parents=True,exist_ok=True);np.savez(p,input=x,target=y);print(p)