-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
KeyError: 'module_list.85.Conv2d.weight' #657
Comments
@Samjith888 your command automatically loads the This error is caused by a user supplying incompatible Compatible python3 train.py --weights yolov3.pt --cfg cfg/yolov3.cfg
python3 train.py --weights yolov3.weights --cfg cfg/yolov3.cfg
python3 train.py --weights yolov3-spp.pt --cfg cfg/yolov3-spp.cfg
python3 train.py --weights ultralytics49.pt --cfg cfg/yolov3-spp.cfg
python3 train.py --weights ultralytics68.pt --cfg cfg/yolov3-spp.cfg To train from scratch (randomly initialized weights), use: python3 train.py --weights '' --cfg cfg/*.cfg # any cfg will work here
|
if i don't want pre_weights,how should i do? |
As @glenn-jocher said,
|
thanks,bro |
I ran this: And got:
What am I mising? |
I'll close this issue for now as the original issue appears to have been resolved, and/or no activity has been seen for some time. Feel free to comment if this is not the case. |
Hi guys, I'm trying to train on a custom CFG (therefore should be using a random initialization of weights). I understand that to do this we should set Unfortunately, even when I do that, it keeps trying to download the weights and I get this error: This is the full command I am using to train: Any help would be great - thanks! |
@rohan-pradhan no space: $ python3 train.py --weights '' --data coco16.data
Namespace(accumulate=4, adam=False, arc='default', batch_size=16, bucket='', cache_images=False, cfg='cfg/yolov3-spp.cfg', data='coco16.data', device='', epochs=273, evolve=False, img_size=[416], multi_scale=False, name='', nosave=False, notest=False, rect=False, resume=False, single_cls=False, var=None, weights='')
Using CPU
Caching labels (16 found, 0 missing, 0 empty, 0 duplicate, for 16 images): 100%|█████████████████████████████| 16/16 [00:00<00:00, 2515.70it/s]
Caching labels (16 found, 0 missing, 0 empty, 0 duplicate, for 16 images): 100%|█████████████████████████████| 16/16 [00:00<00:00, 5567.35it/s]
Model Summary: 225 layers, 6.29987e+07 parameters, 6.29987e+07 gradients
Using 8 dataloader workers
Starting training for 273 epochs...
Epoch gpu_mem GIoU obj cls total targets img_size
0/272 0G 7.7 13.3 7.87 28.9 211 416: 100%|██████████████████████████| 1/1 [01:05<00:00, 65.12s/it]
Class Images Targets P R [email protected] F1: 0%| | 0/1 [00:00<?, ?it/s] |
Thanks for the quick response, Glenn. Unfortunately, even when I copy and paste your command it still gives the same error.
Not sure why it is treating '' as a string. |
Figured it out! Changed it to Thanks again! |
@rohan-pradhan ah interesting. What's your OS? |
@glenn-jocher I'm running Windows 10 in a Conda environment (Anaconda Prompt). |
@rohan-pradhan hmm ok. Perhaps it's windows. |
hi,guys the same error occured,as follows. Traceback (most recent call last): |
@sunset326 update torch to latest version. |
thx,brother |
@sunset326 Great to hear that updating Python resolved the issue! If you have any more questions or run into further issues, feel free to ask. Happy training! 🚀 |
Got the following error:
The text was updated successfully, but these errors were encountered: