When I try to train my model by executing the code cell below:
python train.py –img-size 2048 –cfg cfg/training/yolov7.yaml –hyp data/road_sign_data.yaml –batch 8 –epochs 100 –data data/road_sign.yaml –weights yolov7_training.pt –workers 24 –name yolo_road_det
I have the following error message :
Traceback (most recent call last):
File “C:Users531558Documentsstreamline2yolov7train.py”, line 12, in
import torch.distributed as dist
File “C:Users531558AppDataLocalPackagesPythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0LocalCachelocal-packagesPython311site-packagestorch_init_.py”, line 141, in
raise err
OSError: [WinError 126] The specified module could not be found. Error loading “C:Users531558AppDataLocalPackagesPythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0LocalCachelocal-packagesPython311site-packagestorchlibshm.dll” or one of its dependencies.
It looks like it can not import torch.distibuted
I tried to change the version of python I am using (from 3.12 to 3.11.9) but it still does not work. I also tried many other way to do the training of a yolov7 model but none of them were working… If you have any solution it would be very helpful
Garance MARION is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.