예제 #1
0
    def get_metrics(self, inputs, outputs):
        """Aggregate the metrics for voxel generation model.

    Args:
      inputs: Input dictionary of the voxel generation model.
      outputs: Output dictionary returned by the voxel generation 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_volume_iou_metrics(
            inputs, outputs)

        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
0
파일: model_ptn.py 프로젝트: JiweiHe/models
  def get_metrics(self, inputs, outputs):
    """Aggregate the metrics for voxel generation model.

    Args:
      inputs: Input dictionary of the voxel generation model.
      outputs: Output dictionary returned by the voxel generation 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_volume_iou_metrics(inputs, outputs)

    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