mkang315 / BGF-YOLO

[MICCAI'24] Official implementation of "BGF-YOLO: Enhanced YOLOv8 with Multiscale Attentional Feature Fusion for Brain Tumor Detection".
GNU Affero General Public License v3.0
90 stars 12 forks source link

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

Open ruiyao123 opened 3 weeks ago

ruiyao123 commented 3 weeks ago

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

ruiyao123 commented 3 weeks ago

如果输入这个语句的话(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 commented 2 weeks ago

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.