diff --git a/tensorflow/python/profiler/internal/flops_registry.py b/tensorflow/python/profiler/internal/flops_registry.py index bd1e713386b..356fa67a97f 100644 --- a/tensorflow/python/profiler/internal/flops_registry.py +++ b/tensorflow/python/profiler/internal/flops_registry.py @@ -25,53 +25,21 @@ from tensorflow.python.framework import ops # List of all ops which have implemented flops statistics. IMPLEMENTED_OPS = set([ # Unary ops - "Reciprocal", - "Square", - "Rsqrt", - "Log", - "Neg", - "AssignSub", - "AssignAdd", - "L2Loss", - "Softmax", + "Reciprocal", "Square", "Rsqrt", "Log", "Neg", "AssignSub", "AssignAdd", + "L2Loss", "Softmax", # Binary ops - "Add", - "AddV2", - "Sub", - "Mul", - "RealDiv", - "Maximum", - "Minimum", - "Pow", - "RsqrtGrad", - "GreaterEqual", - "Greater", - "LessEqual", - "Less", - "Equal", - "NotEqual", + "Add", "Sub", "Mul", "RealDiv", "Maximum", "Minimum", "Pow", "RsqrtGrad", + "GreaterEqual", "Greater", "LessEqual", "Less", "Equal", "NotEqual", "SquaredDifference", # Reduction ops - "Mean", - "Sum", - "ArgMax", - "ArgMin", - "BiasAddGrad", + "Mean", "Sum", "ArgMax", "ArgMin", "BiasAddGrad", # Convolution and pooling - "AvgPool", - "MaxPool", - "AvgPoolGrad", - "MaxPoolGrad", - "Conv2DBackpropInput", + "AvgPool", "MaxPool", "AvgPoolGrad", "MaxPoolGrad", "Conv2DBackpropInput", "Conv2DBackpropFilter", # Other ops "AddN", # Ops implemented in core tensorflow: - "MatMul", - "Conv2D", - "DepthwiseConv2dNative", - "BiasAdd", - "Dilation2D", + "MatMul", "Conv2D", "DepthwiseConv2dNative", "BiasAdd", "Dilation2D", ]) @@ -177,7 +145,6 @@ def _binary_per_element_op_flops(graph, node, ops_per_element=1): @ops.RegisterStatistics("Add", "flops") -@ops.RegisterStatistics("AddV2", "flops") def _add_flops(graph, node): """Compute flops for Add operation.""" return _binary_per_element_op_flops(graph, node)