本文整理汇总了Python中metrics.add_mask_pred_metrics方法的典型用法代码示例。如果您正苦于以下问题:Python metrics.add_mask_pred_metrics方法的具体用法?Python metrics.add_mask_pred_metrics怎么用?Python metrics.add_mask_pred_metrics使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类metrics
的用法示例。
在下文中一共展示了metrics.add_mask_pred_metrics方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_metrics
# 需要导入模块: import metrics [as 别名]
# 或者: from metrics import add_mask_pred_metrics [as 别名]
def get_metrics(inputs, outputs, params):
"""Aggregate the metrics for rotator model.
Args:
inputs: Input dictionary of the rotator model.
outputs: Output dictionary returned by the rotator model.
params: Hyperparameters of the rotator model.
Returns:
names_to_values: metrics->values (dict).
names_to_updates: metrics->ops (dict).
"""
names_to_values = dict()
names_to_updates = dict()
tmp_values, tmp_updates = metrics.add_image_pred_metrics(
inputs, outputs, params.num_views, 3*params.image_size**2)
names_to_values.update(tmp_values)
names_to_updates.update(tmp_updates)
tmp_values, tmp_updates = metrics.add_mask_pred_metrics(
inputs, outputs, params.num_views, params.image_size**2)
names_to_values.update(tmp_values)
names_to_updates.update(tmp_updates)
for name, value in names_to_values.iteritems():
slim.summaries.add_scalar_summary(
value, name, prefix='eval', print_summary=True)
return names_to_values, names_to_updates
示例2: get_metrics
# 需要导入模块: import metrics [as 别名]
# 或者: from metrics import add_mask_pred_metrics [as 别名]
def get_metrics(inputs, outputs, params):
"""Aggregate the metrics for rotator model.
Args:
inputs: Input dictionary of the rotator model.
outputs: Output dictionary returned by the rotator model.
params: Hyperparameters of the rotator model.
Returns:
names_to_values: metrics->values (dict).
names_to_updates: metrics->ops (dict).
"""
names_to_values = dict()
names_to_updates = dict()
tmp_values, tmp_updates = metrics.add_image_pred_metrics(
inputs, outputs, params.num_views, 3*params.image_size**2)
names_to_values.update(tmp_values)
names_to_updates.update(tmp_updates)
tmp_values, tmp_updates = metrics.add_mask_pred_metrics(
inputs, outputs, params.num_views, params.image_size**2)
names_to_values.update(tmp_values)
names_to_updates.update(tmp_updates)
for name, value in names_to_values.iteritems():
slim.summaries.add_scalar_summary(
value, name, prefix='eval', print_summary=True)
return names_to_values, names_to_updates