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

File "/var/folders/l8/b9v1kgkd6nz9hl__21wh79hm0000gn/T/tmp0dmyw5s2/_tempconfig.py", line 37 bbox_loss=dict(type='IOU_Loss', iou_type='GIOU',loss_weight=0.05), ^ #20

Open
albertyou2 opened this issue Dec 27, 2020 · 4 comments

Comments

@albertyou2
Copy link

你好 @wuzhihao7788

我在mac上训练报错,

Traceback (most recent call last):
File "tools/train.py", line 144, in
main()
File "tools/train.py", line 69, in main
cfg = Config.fromfile(args.config)
File "/Users/youyin/Documents/人工智能研究项目/keypoint/yolodet-pytorch/yolodet/utils/config.py", line 173, in fromfile
cfg_dict, cfg_text = Config._file2dict(filename)
File "/Users/youyin/Documents/人工智能研究项目/keypoint/yolodet-pytorch/yolodet/utils/config.py", line 113, in _file2dict
mod = import_module('_tempconfig')
File "/Users/youyin/anaconda3/envs/yolodet/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 724, in exec_module
File "", line 860, in get_code
File "", line 791, in source_to_code
File "", line 219, in _call_with_frames_removed
File "/var/folders/l8/b9v1kgkd6nz9hl__21wh79hm0000gn/T/tmp0dmyw5s2/_tempconfig.py", line 37
bbox_loss=dict(type='IOU_Loss', iou_type='GIOU',loss_weight=0.05),
^
SyntaxError: invalid syntax

@NongFu123
Copy link

检查一下这一句bbox_loss=dict(type='IOU_Loss', iou_type='GIOU',loss_weight=0.05),的上一句结尾是不是没加逗号

@dsp6414
Copy link

dsp6414 commented Jan 14, 2021

千万别轻易用中文目录与文件名,与国际接轨- ̗̀(๑ᵔ⌔ᵔ๑)。

@monoloxo
Copy link

我是在ubuntu18.04上做的,和你报的错几乎一样,请问你现在知道什么原因了吗?

@monoloxo
Copy link

我找到了,确实是yolov4_coco_100e.py中bbox那行的上一句的None后面没有逗号的原因。

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

4 participants