2021
07-12
07-12
Keras在mnist上的CNN实践,并且自定义loss函数曲线图操作
使用keras实现CNN,直接上代码:fromkeras.datasetsimportmnistfromkeras.modelsimportSequentialfromkeras.layersimportDense,Dropout,Activation,Flattenfromkeras.layersimportConvolution2D,MaxPooling2Dfromkeras.utilsimportnp_utilsfromkerasimportbackendasKclassLossHistory(keras.callbacks.Callback):defon_train_begin(self,logs={}):self.losses={'batch':[],'epoch':[]}...
继续阅读 >