From 7750cc7512e28ecb03ed3b702af44c8aed193d6d Mon Sep 17 00:00:00 2001 From: dengkaipeng Date: Sun, 17 Oct 2021 08:30:56 +0000 Subject: [PATCH] fix op_flops not define. test=develop --- python/paddle/hapi/static_flops.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/paddle/hapi/static_flops.py b/python/paddle/hapi/static_flops.py index 07fc19b2cb8..f386bbd0dd6 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 = '' -- GitLab