本文共 241 字,大约阅读时间需要 1 分钟。
from keras.callbacks import EarlyStoppingearlyStopping = EarlyStopping(patience = 20 )his = model.fit(X_TRAIN,Y_TRAIN,epochs=400,batch_size = 32,validation_data = (X_VAL,Y_VAL),callbacks = [earlyStopping])# batch_size = 32 默认训练32组数据更新一次模型的权重
转载地址:http://sebqj.baihongyu.com/