-
Notifications
You must be signed in to change notification settings - Fork 43
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
ImportError: cannot import name 'add_flops_counting_methods' from 'ptflops.flops_counter' #25
Comments
Plz, check this repo : https://github.com/sovrasov/flops-counter.pytorch/blob/master/ptflops/flops_counter.py I changed from ptflops.flops_counter import add_flops_counting_methods (add # Maybe you know what I mean)I solved this problem I hope it will be work on your env |
주석처리 하라는 말씀이시죠? |
어우.. 한국분이시네요ㅋㅋ
네 맞습니다. 그거 하고나니 돌아가던데요?
제가 저거 답은 처음 달아봐서 # 넣었더니 볼드 처리 되네요...ㅋㅋㅋ
2022년 4월 22일 (금) 오후 2:56, Sangjun Lee ***@***.***>님이 작성:
… 주석처리 하라는 말씀이시죠?
—
Reply to this email directly, view it on GitHub
<#25 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASXO7EZQH6S6RRQU4XRNGX3VGI5PRANCNFSM5SOQC7PQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
네 ㅋㅋㅋ 답변 감사합니다 |
Can you explain how to change it? |
Put #from ptflops.flops_counter import add_flops_counting_methods.
That line don't need to run this model
2022년 5월 18일 (수) 오후 9:45, 123jyw ***@***.***>님이 작성:
… Can you explain how to change it?
—
Reply to this email directly, view it on GitHub
<#25 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASXO7E74VTXCBSX6RCTVE2LVKTQ47ANCNFSM5SOQC7PQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Even though I have installed ptflops using pip, I cannot train by this problem..
~/BtcDet/tools$ python3 train.py --cfg_file ./cfgs/model_configs/btcdet_kitti_car.yaml --output_dir ../output/kitti_car/ --batch_size 2 --gpu_str "0"
Traceback (most recent call last):
File "train.py", line 6, in
from test import repeat_eval_ckpt
File "/home/server10/BtcDet/tools/test.py", line 17, in
from eval_utils import eval_utils as eval_utils
File "/home/server10/BtcDet/tools/eval_utils/eval_utils.py", line 10, in
from ptflops.flops_counter import add_flops_counting_methods
ImportError: cannot import name 'add_flops_counting_methods' from 'ptflops.flops_counter' (/home/server10/.local/lib/python3.8/site-packages/ptflops/flops_counter.py)
How can I handle this error?
The text was updated successfully, but these errors were encountered: