Megvii-BaseDetection / YOLOX

YOLOX is a high-performance anchor-free YOLO, exceeding yolov3~v5 with MegEngine, ONNX, TensorRT, ncnn, and OpenVINO supported. Documentation: https://yolox.readthedocs.io/
Apache License 2.0
9.45k stars 2.21k forks source link

AssertionError while training #1293

Closed nahidalam closed 2 years ago

nahidalam commented 2 years ago

I am following your documentation from here

When I try to train using this command

python tools/train.py -n yolox-s -d 8 -b 64 --fp16 -o [--cache]

I get below error

Traceback (most recent call last):
  File "tools/train.py", line 124, in <module>
    exp.merge(args.opts)
  File "/home/ec2-user/SageMaker/YOLOX/yolox/exp/base_exp.py", line 64, in merge
    assert len(cfg_list) % 2 == 0
AssertionError

After some debugging, I see that only [--cache] is considered as ards.opts. Since that is a odd number, it causes this error.

Please suggest.

FateScript commented 2 years ago

[--cache] means --cache is just an optional input, not input in your cli.

nahidalam commented 2 years ago

@FateScript so what should be the command in CLI?

FateScript commented 2 years ago

Plz use python tools/train.py -n yolox-s -d 8 -b 64 --fp16 -o or python tools/train.py -n yolox-s -d 8 -b 64 --fp16 -o --cache . If you want to use cache, just add --cache.

nahidalam commented 2 years ago

Thanks. I have another issue but that is separate from this one.