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

Method save

examples/reinforcement_learning/tutorial_PG.py:145–153  ·  view source on GitHub ↗

save trained weights :return: None

(self)

Source from the content-addressed store, hash-verified

143 return discounted_reward_buffer
144
145 def save(self):
146 """
147 save trained weights
148 :return: None
149 """
150 path = os.path.join('model', '_'.join([ALG_NAME, ENV_ID]))
151 if not os.path.exists(path):
152 os.makedirs(path)
153 tl.files.save_weights_to_hdf5(os.path.join(path, 'pg_policy.hdf5'), self.model)
154
155 def load(self):
156 """

Callers 1

tutorial_PG.pyFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected