pysteps / scripts /fake_data.py
zhangrenchao's picture
Publish pysteps reproduction
00cfe91 verified
Raw
History Blame Contribute Delete
345 Bytes
from pathlib import Path
import sys,numpy as np
R=Path(__file__).resolve().parents[1];sys.path.insert(0,str(R));from model.pysteps import *
c=cfg(R);p=R/c['data']['path'];p.parent.mkdir(parents=True,exist_ok=True);np.savez_compressed(p,input=frames(),target=torch.stack([torch.roll(frames()[-1],(2*s,3*s),(0,1)) for s in range(1,13)]));print(p)