Defines what to do in one iteration. The default is: ``self.hooked_sess.run(self.train_op)``. The behavior of each iteration can be changed by either setting ``trainer.train_op``, or overriding this method.
(self)
| 165 | register_callback = _register_callback |
| 166 | |
| 167 | def run_step(self): |
| 168 | """ |
| 169 | Defines what to do in one iteration. The default is: |
| 170 | ``self.hooked_sess.run(self.train_op)``. |
| 171 | |
| 172 | The behavior of each iteration can be changed by either setting ``trainer.train_op``, |
| 173 | or overriding this method. |
| 174 | """ |
| 175 | if not hasattr(self, 'train_op'): |
| 176 | raise NotImplementedError( |
| 177 | "Please either set `Trainer.train_op` or provide an implementation " |
| 178 | "of Trainer.run_step()!") |
| 179 | self.hooked_sess.run(self.train_op) |
| 180 | |
| 181 | @call_only_once |
| 182 | def setup_callbacks(self, callbacks, monitors): |