GOATmessi8 / ASFF

yolov3 with mobilenet v2 and ASFF
GNU General Public License v3.0
1.05k stars 216 forks source link

TypeError: evaluate() takes from 2 to 3 positional arguments but 4 were given #58

Open ys0823 opened 4 years ago

ys0823 commented 4 years ago

I get this error when I train the model by using python -m torch.distributed.launch --nproc_per_node=4 --master_port=1234 main.py --cfg config/yolov3_baseline.cfg -d VOC --distributed --ngpu 4 --checkpoint weights/darknet53_feature_mx.pth --start_epoch 0 --half --asff --rfb --dropblock --log_dir log/VOC_ASFF -s 608 to train.

it seems that the input of the eval code is wrong:

Original exception was: Traceback (most recent call last): File "/data/tanglin/software/pycharm-2018.3.2/helpers/pydev/pydevd.py", line 1741, in <module> main() File "/data/tanglin/software/pycharm-2018.3.2/helpers/pydev/pydevd.py", line 1735, in main globals = debugger.run(setup['file'], None, None, is_module) File "/data/tanglin/software/pycharm-2018.3.2/helpers/pydev/pydevd.py", line 1135, in run pydev_imports.execfile(file, globals, locals) # execute the script File "/data/tanglin/software/pycharm-2018.3.2/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "/data/tanglin/ASFF/ASFF/main.py", line 470, in <module> main() File "/data/tanglin/ASFF/ASFF/main.py", line 365, in main ap50_95, ap50 = evaluator.evaluate(model, args.half,args.distributed)

I don't know what I should do? @ruinmessi THANKS

GOATmessi8 commented 4 years ago

@ys0823 It seems a bug exists on the voc evaluator. I will check this at the weekend.

westnight commented 4 years ago

@ruinmessi Have you figure it out? Looking forward

KelvinHuang666 commented 4 years ago

line 365, in main ap50_95, ap50 = evaluator.evaluate(model, args.half,args.distributed) instand of ap50_95, ap50 = evaluator.evaluate(model, args.half)

xaohuicai commented 4 years ago

多了个参数,给evaluator.evaluate()函数添加一个参数distributed=False