save trained weights :return: None
(self)
| 202 | return np.clip(action, -self.action_bound, self.action_bound) |
| 203 | |
| 204 | def save(self): |
| 205 | """ |
| 206 | save trained weights |
| 207 | :return: None |
| 208 | """ |
| 209 | path = os.path.join('model', '_'.join([ALG_NAME, ENV_ID])) |
| 210 | if not os.path.exists(path): |
| 211 | os.makedirs(path) |
| 212 | tl.files.save_weights_to_hdf5(os.path.join(path, 'actor.hdf5'), self.actor) |
| 213 | tl.files.save_weights_to_hdf5(os.path.join(path, 'critic.hdf5'), self.critic) |
| 214 | |
| 215 | def load(self): |
| 216 | """ |
no outgoing calls
no test coverage detected