# gsutil cp gs://tensorflow/tf-keras-datasets/mnist.npz /tmp/data/mnist.npz
# python3
>>> import tensorflow as tf
>>> path = '/tmp/data/mnist.npz'
>>> (train_images, train_labels), (test_images, test_labels) = tf.keras.datasets.mnist.load_data(path)
>>> len(train_images)
>>> 60000
gsutil 出错ImportError: cannot import name 'opentype'
,
就再升级一下pyasn1-modules , pip install --upgrade pyasn1-modules
将keras数据集下载到本地,统一存到某个目录里,再将该目录地址在load_data时覆盖默认地址,就不用自定义load_data函数了