mnist.npz的使用
path = r"C:\Users\wuhao\.keras\datasets\mnist.npz" def load_data(path): with np.load(path) as f: x_train, y_train = f['x_train'], f['y_train'] x_test, y_test = f['x_test'], f['y_test'] return (x_train, y_train), (x_test, y_test)
path = r"C:\Users\wuhao\.keras\datasets\mnist.npz" def load_data(path): with np.load(path) as f: x_train, y_train = f['x_train'], f['y_train'] x_test, y_test = f['x_test'], f['y_test'] return (x_train, y_train), (x_test, y_test)