Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

参数量和计算量统计 #16

Closed
h-bo opened this issue Jul 26, 2023 · 6 comments
Closed

参数量和计算量统计 #16

h-bo opened this issue Jul 26, 2023 · 6 comments

Comments

@h-bo
Copy link
Contributor

h-bo commented Jul 26, 2023

paddleDetection里rt-detr文档有 参数量和计算量统计

但是似乎跑不了(接口不对)
paddle.flops(model, None, blob, custom_ops=None, print_detail=False)

参数位置不对,以及flops里的input_size只支持是个list
虽然是paddleDetection仓库,但还是在这里问了,那边东西太多回复太慢/笑哭

@lyuwenyu
Copy link
Owner

lyuwenyu commented Jul 26, 2023

得改一下源代码

你参考我这个文档改一下paddle dynamic_flops.py的源码 https://github.com/lyuwenyu/RT-DETR/tree/main/rtdetr_paddle

image

@h-bo
Copy link
Contributor Author

h-bo commented Jul 31, 2023

现在的flops是不是只统计了层中的计算,没有统计矩阵乘 (在transformer中可能是比较大的) @lyuwenyu

@lyuwenyu
Copy link
Owner

lyuwenyu commented Aug 6, 2023

是的

@todesti2
Copy link

现在的flops是不是只统计了层中的计算,没有统计矩阵乘 (在transformer中可能是比较大的) @lyuwenyu

你好,请问你改后能运行吗

@todesti2
Copy link

得改一下源代码

你参考我这个文档改一下paddle dynamic_flops.py的源码 https://github.com/lyuwenyu/RT-DETR/tree/main/rtdetr_paddle

image

呜呜 按照步骤改了还是出错呢

@todesti2
Copy link

现在的flops是不是只统计了层中的计算,没有统计矩阵乘 (在transformer中可能是比较大的) @lyuwenyu

你好 请问你抛出计算量和参数量了嘛

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants