From df1bf7aac5642caa372e55030b4277c1ab4f572d Mon Sep 17 00:00:00 2001 From: yingyibiao Date: Tue, 15 Jun 2021 16:04:04 +0800 Subject: [PATCH] test=develop --- 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 8be6758f1e54b5..2c59ee67d4a8e9 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