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

'types.SimpleNamespace' object has no attribute 'workers' #16

Open
ruiyao123 opened this issue Nov 7, 2024 · 2 comments
Open

'types.SimpleNamespace' object has no attribute 'workers' #16

ruiyao123 opened this issue Nov 7, 2024 · 2 comments

Comments

@ruiyao123
Copy link

将workers设置为0却一直报这个错,请问是为什么呢

@ruiyao123
Copy link
Author

如果输入这个语句的话(BGFyolo) PS D:\Myself\crackdetect\BGF-YOLO-main> python yolo\bgf\detect\train.py --data datasets/br35h.yaml --model models/bgf/bgf-yolo.yaml --workers 0 --epochs 120
Traceback (most recent call last):
File "D:\Myself\crackdetect\BGF-YOLO-main\yolo\bgf\detect\train.py", line 6, in
import yolo.bgf.detect.val
ModuleNotFoundError: No module named 'yolo'却显示找不到yolo

@mkang315
Copy link
Owner

mkang315 commented Nov 8, 2024

Please refer to 'workers' related code in train.py

workers=self.args.workers,

and its description in train-args.

| `workers`         | `8`      | Number of worker threads for data loading (per `RANK` if Multi-GPU training). Influences the speed of data preprocessing and feeding into the model, especially useful in multi-GPU setups.

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

2 participants