2021
02-21
02-21
Keras保存模型并载入模型继续训练的实现
我们以MNIST手写数字识别为例importnumpyasnpfromkeras.datasetsimportmnistfromkeras.utilsimportnp_utilsfromkeras.modelsimportSequentialfromkeras.layersimportDensefromkeras.optimizersimportSGD#载入数据(x_train,y_train),(x_test,y_test)=mnist.load_data()#(60000,28,28)print('x_shape:',x_train.shape)#(60000)print('y_shape:',y_train.shape)#(60000,28,28)->(60000,784)x_train=x_trai...
继续阅读 >