【发布时间】:2018-02-25 07:23:00
【问题描述】:
我想使用 Keras ModelCheckpoint 回调来监控几个参数(我有一个多任务网络)。只有一个回调有可能吗?还是我需要在很多回调中这样做??
创建 ckechpoint :
checkpointer = ModelCheckpoint(filepath='checkpoints/weights-{epoch:02d}.hdf5', monitor='val_O1_categorical_accuracy' , verbose=1, save_best_only=True, mode='max')
我要监控的第二个参数:val_O2_categorical_accuracy
在列表中这样做是行不通的。即
checkpointer = ModelCheckpoint(filepath='checkpoints/weights-{epoch:02d}.hdf5', monitor=['val_O1_categorical_accuracy','val_O2_categorical_accuracy'] , verbose=1, save_best_only=True, mode='max')
TypeError: unhashable type: 'list'
【问题讨论】:
标签: python tensorflow keras conv-neural-network keras-2