parameters: (self, max_iters)
return_statement: return model_paths
docstring: Network training loop.
docstring_summary: Network training loop.
docstring_tokens: Network training loop .
function: def train_model(self, max_iters):
          """Network training loop."""
          last_snapshot_iter = -1
          timer = Timer()
          model_paths = []
          while self.solver.iter < max_iters:
              # Make one SGD update
              timer.tic()
              self.solver.step(1)
              timer.toc()
              if self.solver.iter % (10 * self.solver_param.display) == 0:
                  print 'speed: {:.3f}s / iter'.format(timer.average_time)
  
              if self.solver.iter % cfg.TRAIN.SNAPSHOT_ITERS == 0:
                  last_snapshot_iter = self.solver.iter
                  model_paths.append(self.snapshot())
  
          if last_snapshot_iter != self.solver.iter:
              model_paths.append(self.snapshot())
          return model_paths
function_tokens: def train_model ( self , max_iters ) : last_snapshot_iter = - 1 timer = Timer ( ) model_paths = [ ] while self . solver . iter < max_iters : # Make one SGD update timer . tic ( ) self . solver . step ( 1 ) timer . toc ( ) if self . solver . iter % ( 10 * self . solver_param . display ) == 0 : print 'speed: {:.3f}s / iter' . format ( timer . average_time ) if self . solver . iter % cfg . TRAIN . SNAPSHOT_ITERS == 0 : last_snapshot_iter = self . solver . iter model_paths . append ( self . snapshot ( ) ) if last_snapshot_iter != self . solver . iter : model_paths . append ( self . snapshot ( ) ) return model_paths