【keras】解决 example 案例中 MNIST 数据集下载不了的问题

原文链接:https://blog.csdn.net/houchaoqun_xmu/article/details/78492718

# the data, shuffled and split between train and test sets   
# (x_train, y_train), (x_test, y_test) = mnist.load_data() 

换成

import numpy as np  
path='./mnist.npz'  
f = np.load(path)  
x_train, y_train = f['x_train'], f['y_train']  
x_test, y_test = f['x_test'], f['y_test']  
f.close()

你可能感兴趣的:(【keras】解决 example 案例中 MNIST 数据集下载不了的问题)