import json, math, random, time from pathlib import Path import numpy as np import torch import torch.nn as nn SEED=17 random.seed(SEED); np.random.seed(SEED); torch.manual_seed(SEED) torch.set_num_threads(4) try: device=torch.device('cuda' if torch.cuda.is_available() else 'cpu') if device.type=='cuda': torch.zeros(1,device=device) except Exception: device=torch.device('cpu') def math_check(): ps=np.linspace(.01,.99,99); tau=.37; dy=2.3 rng=np.random.default_rng(SEED); vars=[] for p in ps: y=np.where(rng.random(200000).94: z[i,t]=r.random()