仔細看完code後可以猜出來MNIST data set是從網路硬碟下載來的
原始example code:
https://github.com/fchollet/keras/blob/master/examples/mnist_mlp.py
from keras.datasets import mnist | |
from keras.models import Sequential |
繼續往下追可以知道 "lib/python2.7/site-packages/keras/datasets/mnist.py"裡面是從AWS S3網路硬碟下載來的
path = get_file(path, origin='https://s3.amazonaws.com/img-datasets/mnist.npz')
下載完後,馬上將training data和test data取出
f = np.load(path)
x_train = f['x_train']
y_train = f['y_train']
x_test = f['x_test']
y_test = f['y_test']
沒有留言:
張貼留言