'Network training loop.'

def train_model(self, max_iters):

    last_snapshot_iter = (-1)
    timer = Timer()
    model_paths = []
    while (self.solver.iter < max_iters):
        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
