未验证 提交 d3a2ba07 编写于 作者: Y yingyibiao 提交者: GitHub

test=develop (#33576)

上级 2800897a
...@@ -211,8 +211,8 @@ def dynamic_flops(model, inputs, custom_ops=None, print_detail=False): ...@@ -211,8 +211,8 @@ def dynamic_flops(model, inputs, custom_ops=None, print_detail=False):
def add_hooks(m): def add_hooks(m):
if len(list(m.children())) > 0: if len(list(m.children())) > 0:
return return
m.register_buffer('total_ops', paddle.zeros([1], dtype='int32')) m.register_buffer('total_ops', paddle.zeros([1], dtype='int64'))
m.register_buffer('total_params', paddle.zeros([1], dtype='int32')) m.register_buffer('total_params', paddle.zeros([1], dtype='int64'))
m_type = type(m) m_type = type(m)
flops_fn = None flops_fn = None
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册