  
      for epoch in range(num_epochs):
          if not is_random_iter:
              state = init_rnn_state(batch_size, num_hiddens, ctx)
          l_sum, start = 0.0, time.time()
          data_iter = data_iter_fn(corpus_indices, batch_size, num_steps, ctx)
          for t, (X, Y) in enumerate(data_iter):
              if is_random_iter:
                  state = init_rnn_state(batch_size, num_hiddens, ctx)
              else:
 
</s> remove         for t, (X, Y) in enumerate(data_iter):
 </s> add         for X, Y in data_iter: </s> remove         l_sum, start = 0.0, time.time()
        data_iter = data_iter_consecutive(
 </s> add         l_sum, n, start = 0.0, 0, time.time()
        data_iter = gb.data_iter_consecutive( </s> remove         for t, (X, Y) in enumerate(data_iter):
 </s> add         for X, Y in data_iter: </s> remove         data_iter_fn = data_iter_consecutive
 </s> add         data_iter_fn = gb.data_iter_consecutive </s> remove     for epoch in range(1, num_epochs + 1):
        train_l_sum, train_acc_sum, n, m = 0.0, 0.0, 0.0, 0.0
        start = time.time()
 </s> add     for epoch in range(num_epochs):
        train_l_sum, train_acc_sum, n, m, start = 0.0, 0.0, 0, 0, time.time()
        l_sum, n, start = 0.0, 0, time.time()
  
      for epoch in range(num_epochs):
          if not is_random_iter:
              state = init_rnn_state(batch_size, num_hiddens, ctx)
        l_sum, n, start = 0.0, 0, time.time()
          data_iter = data_iter_fn(corpus_indices, batch_size, num_steps, ctx)
          for t, (X, Y) in enumerate(data_iter):
              if is_random_iter:
                  state = init_rnn_state(batch_size, num_hiddens, ctx)
              else:
keep keep keep keep replace keep keep keep keep keep
 gb 0.8.9, fix acc, loss computations 
gluonbook/utils.py