def save_params(self, path): if not os.path.exists(path): os.mkdir(path) save_struct_params(path + os.sep + self.name + '_struct.obj', self.args) p.savez_compressed(path + os.sep + self.name, **self.parameters) if self.batch_normal: self.batch_normal.save_params(path + os.sep + self.name + '_batch_normal') return self.name
def save_parameters(self, path): p.savez_compressed(path + os.sep + self.name, **self.v)
def save_params(self, path): save_struct_params(path + os.sep + self.name + '_struct.obj', self.args) p.savez_compressed(path + os.sep + self.name, **self.parameters) return self.name
def save_params(self, filename): p.savez_compressed(filename, epsilon=self.epsilon, gamma=self.parameters['gamma'], beta=self.parameters['beta'], running_mean=self.running_mean, sqrtvar=self.sqrtvar, running_var=self.running_var)