GRACE-SEDA / scripts /fake_data.py
zhangrenchao's picture
Publish GRACE-SEDA reproduction
bd6dbd0 verified
Raw
History Blame Contribute Delete
359 Bytes
from pathlib import Path
import sys,numpy as np
R=Path(__file__).resolve().parents[1];sys.path.insert(0,str(R));from model.grace_seda import *
c=cfg(R);x=np.stack([sample(i).numpy() for i in range(20)]);p=R/c['data']['path'];p.parent.mkdir(parents=True,exist_ok=True);np.savez_compressed(p,input=x,features=FEATURES,shape=[20,9,32,32],resolution=.5);print(p)