MCPcopy Index your code
hub / github.com/tensorlayer/TensorLayer / save

Method save

examples/reinforcement_learning/tutorial_TRPO.py:331–340  ·  view source on GitHub ↗

save trained weights :return: None

(self)

Source from the content-addressed store, hash-verified

329 return tf.group([p.assign(p_new) for p, p_new in zip(pi_params, new_params)])
330
331 def save(self):
332 """
333 save trained weights
334 :return: None
335 """
336 path = os.path.join('model', '_'.join([ALG_NAME, ENV_ID]))
337 if not os.path.exists(path):
338 os.makedirs(path)
339 tl.files.save_weights_to_hdf5(os.path.join(path, 'actor.hdf5'), self.actor)
340 tl.files.save_weights_to_hdf5(os.path.join(path, 'critic.hdf5'), self.critic)
341
342 def load(self):
343 """

Callers 1

tutorial_TRPO.pyFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected