  all: html
  
  build/%.ipynb: %.md build/build.yml utils.py
  	@mkdir -p $(@D)
  	cd $(@D); python ../md2ipynb.py ../../$< ../../$@
  
  build/%.md: %.md
  	@mkdir -p $(@D)
 
</s> remove                 y_vals.append(square_loss(net(X), y).mean().asnumpy())
 </s> add                 ls.append(loss(net(features), labels).mean().asnumpy())
    # To print more conveniently, use numpy. </s> remove                 output = net(features)
                loss = square_loss(output, label)
            loss.backward()
 </s> add                 l = loss(net(X), y)
            l.backward() </s> remove         acc.wait_to_read() # don't push too many operators into backend
 </s> add         acc.wait_to_read()  </s> remove             acc += nd.sum(net(X).argmax(axis=1)==y).copyto(mx.cpu())
 </s> add             acc += (net(X).argmax(axis=1)==y).sum().copyto(mx.cpu()) </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):
build/%.ipynb: %.md build/build.yml gluonbook/*
  all: html
  
build/%.ipynb: %.md build/build.yml gluonbook/*
  	@mkdir -p $(@D)
  	cd $(@D); python ../md2ipynb.py ../../$< ../../$@
  
  build/%.md: %.md
  	@mkdir -p $(@D)
keep keep replace keep keep keep keep keep
 apply gluonbook in dl basics, cnn, remove gluonbook deps 
Makefile