talebolano / yolov3-network-slimming

yolov3 network slimming剪枝的一种实现
345 stars 93 forks source link

Syntax error #20

Closed AbanoubMamdouh closed 5 years ago

AbanoubMamdouh commented 5 years ago

Hello, I have a tiny yolov3 architecture that I want to optimize, I wrote the following in the terminal:

python sparsity_train.py -sr --s 0.0001 --image_folder obj.data --cfg cfg/yolov3-tiny_obj1.cfg --weights yolov3-tiny_obj1_15000.weights

I got the error:

Traceback (most recent call last): File "sparsity_train.py", line 3, in from yolomodel import File "/home/abanoub/Desktop/yolov3-network-slimming-master/yolomodel.py", line 347 x, losses = self.module_list[i][0](x, targets) ^ SyntaxError: invalid syntax

Any idea why this is occuring? Does the code need a specific python version? Help is much appreciated! Cheers

chensi41 commented 5 years ago

Have you found the answer?

AbanoubMamdouh commented 5 years ago

@chensi41 yes, I was using an old version of python (2.7), update your python version to 3.x and it will work fine