本文整理汇总了Python中evaluator.Evaluator.display_caption方法的典型用法代码示例。如果您正苦于以下问题:Python Evaluator.display_caption方法的具体用法?Python Evaluator.display_caption怎么用?Python Evaluator.display_caption使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类evaluator.Evaluator
的用法示例。
在下文中一共展示了Evaluator.display_caption方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: print
# 需要导入模块: from evaluator import Evaluator [as 别名]
# 或者: from evaluator.Evaluator import display_caption [as 别名]
print(model.summary())
print('Number of parameters:', model.count_params())
training_history_filename = preprocessed_data_path + 'training_history.log'
csv_logger = CSVLogger(training_history_filename, append=False)
model_names = ('../trained_models/IAPR_2012/' +
'iapr_weights.{epoch:02d}-{val_loss:.2f}.hdf5')
model_checkpoint = ModelCheckpoint(model_names,
monitor='val_loss',
verbose=1,
save_best_only=False,
save_weights_only=False)
reduce_learning_rate = ReduceLROnPlateau(monitor='val_loss', factor=0.1,
patience=5, verbose=1)
callbacks = [csv_logger, model_checkpoint, reduce_learning_rate]
model.fit_generator(generator=generator.flow(mode='train'),
steps_per_epoch=int(num_training_samples / batch_size),
epochs=num_epochs,
verbose=1,
callbacks=callbacks,
validation_data=generator.flow(mode='validation'),
validation_steps=int(num_validation_samples / batch_size))
evaluator = Evaluator(model, data_path=preprocessed_data_path,
images_path=root_path + 'iaprtc12/')
evaluator.display_caption()