def train_and_validate_to_end(self, validate_step_size=<NUM_LIT:50>):
while not self._sess.should_stop():<EOL><INDENT>self.train_on_batch()  <EOL>if self.global_step % validate_step_size == <NUM_LIT:0>:<EOL><INDENT>log_str = '<STR_LIT>' % self.global_step<EOL>for n, m in self.validation_metrics:<EOL><INDENT>log_str += '<STR_LIT>' % (n.name, m)<EOL><DEDENT>logging.info(log_str)<EOL><DEDENT><DEDENT>
A helper function that shows how to train and validate a model at the same time.

        Parameters
        ----------
        validate_step_size : int
            Validate the training network every N steps.