keras数据集加载

总共有两种方式

from keras.datasets import mnist

#第一种数据集加载方式:把数据集放在C:\Users\Administrator\.keras\datasets文件夹下,这样会自动加载
#(x_train, y_train),(x_test, y_test) = mnist.load_data('11')
#x_train, x_test = x_train / 255.0, x_test / 255.0

#第二种数据集加载方式,用数据集文件的绝对路径
path = 'E:/python_work1/learn/data/keras_datasets/mnist.npz'
(x_train, y_train),(x_test, y_test) = mnist.load_data(path)

你可能感兴趣的:(人工智能,神经网络,深度学习)