MCPcopy
hub / github.com/tensorlayer/TensorLayer / load

Method load

examples/reinforcement_learning/tutorial_DDPG.py:224–233  ·  view source on GitHub ↗

load trained weights :return: None

(self)

Source from the content-addressed store, hash-verified

222 tl.files.save_weights_to_hdf5(os.path.join(path, 'critic_target.hdf5'), self.critic_target)
223
224 def load(self):
225 """
226 load trained weights
227 :return: None
228 """
229 path = os.path.join('model', '_'.join([ALG_NAME, ENV_ID]))
230 tl.files.load_hdf5_to_weights_in_order(os.path.join(path, 'actor.hdf5'), self.actor)
231 tl.files.load_hdf5_to_weights_in_order(os.path.join(path, 'actor_target.hdf5'), self.actor_target)
232 tl.files.load_hdf5_to_weights_in_order(os.path.join(path, 'critic.hdf5'), self.critic)
233 tl.files.load_hdf5_to_weights_in_order(os.path.join(path, 'critic_target.hdf5'), self.critic_target)
234
235
236if __name__ == '__main__':

Callers 1

tutorial_DDPG.pyFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected