save trained weights :return: None
(self)
| 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 | """ |