训练YOLOX的时候,每次评估均会报错停止,报错信息如下:
2022-07-02 17:51:57 | INFO | yolox.core.trainer:253 - epoch: 10/300, iter: 10/36, mem: 5854Mb, iter_time: 0.220s, data_time: 0.001s, total_loss: 6.4, i
ou_loss: 2.7, l1_loss: 0.0, conf_loss: 3.1, cls_loss: 0.6, lr: 1.248e-03, size: 608, ETA: 0:53:54
2022-07-02 17:52:00 | INFO | yolox.core.trainer:253 - epoch: 10/300, iter: 20/36, mem: 5854Mb, iter_time: 0.225s, data_time: 0.001s, total_loss: 6.3, i
ou_loss: 2.8, l1_loss: 0.0, conf_loss: 2.9, cls_loss: 0.7, lr: 1.247e-03, size: 480, ETA: 0:53:26
2022-07-02 17:52:02 | INFO | yolox.core.trainer:253 - epoch: 10/300, iter: 30/36, mem: 5854Mb, iter_time: 0.235s, data_time: 0.001s, total_loss: 6.6, i
ou_loss: 2.7, l1_loss: 0.0, conf_loss: 3.3, cls_loss: 0.6, lr: 1.247e-03, size: 672, ETA: 0:53:02
2022-07-02 17:52:04 | INFO | yolox.core.trainer:356 - Save weights to ./YOLOX_outputs\yolox_voc_s
2022-07-02 17:52:04 | INFO | yolox.core.trainer:195 - Training of experiment is done and the best AP is 0.00
2022-07-02 17:52:04 | ERROR | yolox.core.launch:98 - An error has been caught in function 'launch', process 'MainProcess' (14092), thread 'MainThread' (
5720):
Traceback (most recent call last):
File "E:\Study\DeepLearn\DPlearn\YOLO\YOLOX\tools\train.py", line 134, in
launch(
└
File "C:\ProgramData\Anaconda3\lib\site-packages\yolox-0.3.0-py3.9.egg\yolox\core\launch.py", line 98, in launch
main_func(*args)
│ └ (╒═══════════════════╤═══════════════════════════════════════════════════════════════════════════════════════════════════════...
└
File "E:\Study\DeepLearn\DPlearn\YOLO\YOLOX\tools\train.py", line 118, in main
trainer.train()
│ └
└
File "C:\ProgramData\Anaconda3\lib\site-packages\yolox-0.3.0-py3.9.egg\yolox\core\trainer.py", line 76, in train
self.train_in_epoch()
│ └
└
File "C:\ProgramData\Anaconda3\lib\site-packages\yolox-0.3.0-py3.9.egg\yolox\core\trainer.py", line 86, in train_in_epoch
self.after_epoch()
│ └
└
File "C:\ProgramData\Anaconda3\lib\site-packages\yolox-0.3.0-py3.9.egg\yolox\core\trainer.py", line 222, in after_epoch
self.evaluate_and_save_model()
│ └
└
File "C:\ProgramData\Anaconda3\lib\site-packages\yolox-0.3.0-py3.9.egg\yolox\core\trainer.py", line 328, in evaluate_and_save_model
(ap50_95, ap50, summary), predictions = self.exp.eval(
│ │ └
│ └ ╒═══════════════════╤═══════════════════════════════════════════════════════════════════════════════════
═════════════════════...
└
File "C:\ProgramData\Anaconda3\lib\site-packages\yolox-0.3.0-py3.9.egg\yolox\exp\yolox_base.py", line 322, in eval
return evaluator.evaluate(model, is_distributed, half, return_outputs=return_outputs)
│ │ │ │ │ └ True
│ │ │ │ └ False
│ │ │ └ False
│ │ └ YOLOX(
│ │ (backbone): YOLOPAFPN(
│ │ (backbone): CSPDarknet(
│ │ (stem): Focus(
│ │ (conv): BaseConv(
│ │ (conv): ...
│ └
└
TypeError: evaluate() got an unexpected keyword argument 'return_outputs'
查询无果后,在github提交了Issues
现在这个问题被标记为了bug,已经进行了修复,现在出现了这个问题的解决方案就是重新pull最新的代码下来。