update the mnist notebook to use the new apis [skip ci]