diff --git a/python/paddle/hapi/static_flops.py b/python/paddle/hapi/static_flops.py index 07fc19b2cb89a588d103140a48f85d3f147d6aa9..f386bbd0dd6db168cfcf36745be79b6732312a42 100644 --- a/python/paddle/hapi/static_flops.py +++ b/python/paddle/hapi/static_flops.py @@ -176,6 +176,7 @@ def count_element_op(op): def _graph_flops(graph, detail=False): assert isinstance(graph, GraphWrapper) flops = 0 + op_flops = 0 table = Table(["OP Type", 'Param name', "Flops"]) for op in graph.ops(): param_name = ''