PengyiZhang / SlimYOLOv3

This page is for the SlimYOLOv3: Narrower, Faster and Better for UAV Real-Time Applications
1.14k stars 320 forks source link

Invalid Syntax error while Normal Training :yolov4 #79

Open anusha657 opened 3 years ago

anusha657 commented 3 years ago

a ) I cloned https://github.com/ultralytics/yolov3

b) I m using yolov4.weights and yolov4.cfg from " !git clone https://github.com/AlexeyAB/darknet "

c) I m in step 1 - Normal Training command used - python3 /content/yolov3/train.py --data /content/darknet/cfg/obj_coco.data --batch-size 16 -pt --weights /content/darknet/weights/yolov4.weights --cfg /content/darknet/cfg/yolov4.cfg

d) Error occured : File "", line 1 python3 /content/yolov3/train.py --data /content/darknet/cfg/obj_coco.data --batch-size 16 -pt --weights /content/darknet/weights/yolov4.weights --cfg /content/darknet/cfg/yolov4.cfg ^ SyntaxError: invalid syntax

anusha657 commented 3 years ago

Above Issue is RESOLVED . Now currently I m stuck in another issue.

Step 1. I m doing the Sparsity Training Using the repository - https://github.com/PengyiZhang/SlimYOLOv3/ and went to Step 2.

Step 2. README.md NOTICE:

TO run sparsity training and channel pruning, ultralytics/yolov3 is required. We only provide the pruning method for channel pruning (prune.py) and subgradient method for sparsity training (sparsity.py). Sparsity training can be done by using updateBN() in sparsity.py before optimizer.step() in train.py. The channel pruning can be done by prune.py.

Step 3. Cloned the repository ultralytics/yolov3 Command Used - ! python3 /content/archived_yolov3/yolov3/train.py --cfg /content/darknet/cfg/yolov4.cfg --data /content/objcoco.data --weights /content/darknet/weights/yolov4.weights

Please find Attachment of the Error. Error.txt