load trained weights :return: None
(self)
| 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 | |
| 236 | if __name__ == '__main__': |