import json, torch, numpy as np import rank_safe_vp_gn as m torch.manual_seed(m.SEED+2) x,y,xt,yt=m.make_data() # Reuse the implementation while varying rank cutoff; record whether hidden steps work. out={} for rho in [1e-5,1e-4,1e-3,1e-2]: torch.manual_seed(m.SEED+2) out[str(rho)]=m.vp_gn(x,y,xt,yt,width=16,steps=20,rho=rho) print(json.dumps({k:{a:v for a,v in d.items() if a!='history'} for k,d in out.items()},indent=2)) with open('threshold_results.json','w') as f: json.dump(out,f,indent=2)