class Struct(object): pass
def config(IP_indexes):
configs = Struct()
configs.rhos = 0.1 # set spectral radius 0.1 for all recurrent layers
configs.lis = 0.7 # set li 0.7 for all recurrent layers
configs.IPconf = Struct()
configs.IPconf.DeepIP = 1 # activate pre-train
configs.IPconf.threshold = 0.1 # threshold for gradient
configs.reservoirConf = Struct()
configs.reservoirConf.connectivity = 1 # connectivity of recurrent matrix
configs.readout = Struct()
configs.readout.trainMethod = 'NormalEquations' # train with normal equations (faster)
configs.readout.regularizations = 10.0**np.array(range(-4,-1,1))
return configs
python 定义结构体
最新推荐文章于 2024-11-26 16:22:36 发布