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

Error in training P6 yolov6l6 : unexpected keyword argument 'stage_block_type' #820

Closed
4 tasks done
emiyak opened this issue May 9, 2023 · 3 comments · Fixed by #823
Closed
4 tasks done

Error in training P6 yolov6l6 : unexpected keyword argument 'stage_block_type' #820

emiyak opened this issue May 9, 2023 · 3 comments · Fixed by #823
Labels
question Further information is requested

Comments

@emiyak
Copy link

emiyak commented May 9, 2023

Before Asking

  • I have read the README carefully. 我已经仔细阅读了README上的操作指引。

  • I want to train my custom dataset, and I have read the tutorials for training your custom data carefully and organize my dataset correctly; (FYI: We recommand you to apply the config files of xx_finetune.py.) 我想训练自定义数据集,我已经仔细阅读了训练自定义数据的教程,以及按照正确的目录结构存放数据集。(FYI: 我们推荐使用xx_finetune.py等配置文件训练自定义数据集。)

  • I have pulled the latest code of main branch to run again and the problem still existed. 我已经拉取了主分支上最新的代码,重新运行之后,问题仍不能解决。

Search before asking

  • I have searched the YOLOv6 issues and found no similar questions.

Question

Traceback (most recent call last):
File "tools/train.py", line 128, in
main(args)
File "tools/train.py", line 113, in main
trainer = Trainer(args, cfg, device)
File "/user/src/yolov6/YOLOv6/yolov6/core/engine.py", line 58, in init
model = self.get_model(args, cfg, self.num_classes, device)
File "/user/src/yolov6/YOLOv6/yolov6/core/engine.py", line 397, in get_model
model = build_model(cfg, nc, device, fuse_ab=self.args.fuse_ab, distill_ns=self.distill_ns)
File "/user/src/yolov6/YOLOv6/yolov6/models/yolo.py", line 137, in build_model
model = Model(cfg, channels=3, num_classes=num_classes, fuse_ab=fuse_ab, distill_ns=distill_ns).to(device)
File "/user/src/yolov6/YOLOv6/yolov6/models/yolo.py", line 24, in init
self.backbone, self.neck, self.detect = build_network(config, channels, num_classes, num_layers, fuse_ab=fuse_ab, distill_ns=distill_ns)
File "/user/src/yolov6/YOLOv6/yolov6/models/yolo.py", line 80, in build_network
backbone = BACKBONE(
TypeError: init() got an unexpected keyword argument 'stage_block_type'

It looks like it's caused missing attribute stage_block_type in class CSPBepBackbone_P6

Additional

No response

@emiyak emiyak added the question Further information is requested label May 9, 2023
@Chilicyy
Copy link
Collaborator

Chilicyy commented May 9, 2023

Hi, if you want to train P6 models (like yolov6l6 ), you can run git checkout v3 to use this branch currently. We'll convert the P6 models matching for the latest code asap.

@emiyak
Copy link
Author

emiyak commented May 9, 2023

Hi, if you want to train P6 models (like yolov6l6 ), you can run git checkout v3 to use this branch currently. We'll convert the P6 models matching for the latest code asap.

Thank you very much for your speedy reply. May I also check that if ddp mode is well supported for branch v3?

@Chilicyy
Copy link
Collaborator

Chilicyy commented May 9, 2023

Yes, ddp mode is supported. The main differences of branch v3 and the latest code can be seen here.

YahooKID pushed a commit to YahooKID/YOLOv6 that referenced this issue May 11, 2023
Chilicyy pushed a commit that referenced this issue May 11, 2023
zabealbe pushed a commit to zabealbe/YOLOv6 that referenced this issue Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants