From d3a2ba0771372a380a4e74d4f9886c673bf5c6f6 Mon Sep 17 00:00:00 2001 From: yingyibiao Date: Fri, 18 Jun 2021 11:12:19 +0800 Subject: [PATCH] test=develop (#33576) --- python/paddle/hapi/dynamic_flops.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/paddle/hapi/dynamic_flops.py b/python/paddle/hapi/dynamic_flops.py index 8be6758f1e5..2c59ee67d4a 100644 --- a/python/paddle/hapi/dynamic_flops.py +++ b/python/paddle/hapi/dynamic_flops.py @@ -211,8 +211,8 @@ def dynamic_flops(model, inputs, custom_ops=None, print_detail=False): def add_hooks(m): if len(list(m.children())) > 0: return - m.register_buffer('total_ops', paddle.zeros([1], dtype='int32')) - m.register_buffer('total_params', paddle.zeros([1], dtype='int32')) + m.register_buffer('total_ops', paddle.zeros([1], dtype='int64')) + m.register_buffer('total_params', paddle.zeros([1], dtype='int64')) m_type = type(m) flops_fn = None -- GitLab