          ctx_list = [mx.cpu()]
      return ctx_list
  
  def SGD(params, lr):
      for param in params:
          param[:] = param - lr * param.grad
  
  def sgd(params, lr, batch_size):
      """Mini-batch stochastic gradient descent."""
 
</s> remove     return nd.mean(output.argmax(axis=1)==label).asscalar()

 </s> add     """Get accuracy."""
    return (output.argmax(axis=1) == label).mean().asscalar() </s> remove     n = 0.
    if isinstance(data_iterator, mx.io.MXDataIter):
        data_iterator.reset()
    for batch in data_iterator:
        data, label, batch_size = _get_batch(batch, ctx)
        for X, y in zip(data, label):
 </s> add     n = 0
    if isinstance(data_iter, mx.io.MXDataIter):
        data_iter.reset()
    for batch in data_iter:
        features, labels, batch_size = _get_batch(batch, ctx)
        for X, y in zip(features, labels): </s> remove def evaluate_accuracy(data_iterator, net, ctx=[mx.cpu()]):
 </s> add def evaluate_accuracy_cpu(data_iter, net):
    """Evaluate accuracy of a model on the given data set on CPU."""
    acc = 0
    for X, y in data_iter:
        acc += accuracy(net(X), y)
    return acc / len(data_iter)


def evaluate_accuracy(data_iter, net, ctx=[mx.cpu()]):
    """Evaluate accuracy of a model on the given data set.""" </s> remove                 output = net(features)
                loss = square_loss(output, label)
            loss.backward()
 </s> add                 l = loss(net(X), y)
            l.backward()
    """DEPRECATED!"""
          ctx_list = [mx.cpu()]
      return ctx_list
  
  def SGD(params, lr):
    """DEPRECATED!"""
      for param in params:
          param[:] = param - lr * param.grad
  
  def sgd(params, lr, batch_size):
      """Mini-batch stochastic gradient descent."""
keep keep keep add keep keep keep keep keep
 apply gluonbook in dl basics, cnn, remove gluonbook deps 
gluonbook/utils.py