def load_model(self, load_path): with open(load_path, 'r') as f: data = pickle.load(f) L.set_all_param_values(self.network, data)