Machine learning tensorflow';tfprof输出理论失败?

Machine learning tensorflow';tfprof输出理论失败?,machine-learning,tensorflow,profiling,flops,Machine Learning,Tensorflow,Profiling,Flops,我用tfprof描述了一个机器学习算法。这是示例输出: =========================模型分析报告====================== 节点名称|#浮点运算 _TFProfRoot(--/3163.86b触发器) 接收resnetv2/接收resnetv2/混合_6a/分支_1/Conv2d_0b_3x3/卷积(173.41b/173.41b触发器) 接收resnetv2/接收resnetv2/Conv2d_4a_3x3/卷积(167.25b/167.25b触发器)

我用tfprof描述了一个机器学习算法。这是示例输出: =========================模型分析报告====================== 节点名称|#浮点运算 _TFProfRoot(--/3163.86b触发器) 接收resnetv2/接收resnetv2/混合_6a/分支_1/Conv2d_0b_3x3/卷积(173.41b/173.41b触发器) 接收resnetv2/接收resnetv2/Conv2d_4a_3x3/卷积(167.25b/167.25b触发器)


这里,在“167.25b/167.25b触发器”中,第二个167.25b表示什么?是理论上的失败吗?

是的,是理论上的失败。Ops可以使用
RegisterStatistics
注释注册统计信息

以下是此类注册的一个示例:

@ops.RegisterStatistics("MatMul", "flops")
def _calc_mat_mul_flops(graph, node):
  """Calculates the compute resources needed for MatMul."""
  transpose_a = node.attr["transpose_a"].b
  a_shape = graph_util.tensor_shape_from_node_def_name(graph, node.input[0])
  a_shape.assert_is_fully_defined()
  if transpose_a:
    k = int(a_shape[0])
  else:
    k = int(a_shape[1])
  output_shape = graph_util.tensor_shape_from_node_def_name(graph, node.name)
  output_shape.assert_is_fully_defined()
  output_count = np.prod(output_shape.as_list())
  return ops.OpStats("flops", (k * output_count * 2))