WongKinYiu / ScaledYOLOv4

Scaled-YOLOv4: Scaling Cross Stage Partial Network
GNU General Public License v3.0
2.02k stars 574 forks source link

Can't train from scratch: error argument --weights: expected one argument #359

Open mblak3 opened 3 years ago

mblak3 commented 3 years ago

I've recently set up a new machine and am unable to train the program from scratch. Each time I run the program using the train command it errors saying: train.py: error: argument --weights: expected one argument

Of course, I do not want to pass a weights file because I want to train from scratch. I'm using the command: python train.py --batch-size 64 --img 896 896 --data coco.yaml --cfg yolov4-p5.yaml --weights '' --sync-bn --device 0,1,2,3 --name yolov4-p5

I have the program working on another machine using the same command, so I'm unsure what the problem here is.

WongKinYiu commented 3 years ago

try change --weights '' to --weights "".

mblak3 commented 3 years ago

try change --weights '' to --weights "".

I tried this but it did not change anything, I still get the same error. I am trying to run this on windows if that changes anything.

I was able to get it to run by changing the default value of train.py to default='' and then ran the command without --weights but I don't know if this is a proper fix or not.