def _run_train(self, epoch, train_set, train_size=None):
self.network.train_logger.record_epoch(epoch + <NUM_LIT:1>)<EOL>costs = self.train_step(train_set, train_size)<EOL>if not epoch % self.config.monitor_frequency:<EOL><INDENT>self.report(dict(costs), "<STR_LIT:train>", epoch)<EOL><DEDENT>self.last_run_costs = costs<EOL>return costs<EOL>
Run one training iteration.