-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
训练时报错,完成一个epoch是显示 #1803
Comments
2024-11-07 11:16:42 | INFO | yolox.core.trainer:218 - ---> start train epoch1 File "/home/wsjc/S2021/songjl/220430/yolox/YOLOX-main/tools/train.py", line 138, in
File "/home/wsjc/S2021/songjl/220430/yolox/YOLOX-main/tools/train.py", line 118, in main File "/home/wsjc/S2021/songjl/220430/yolox/YOLOX-main/yolox/core/trainer.py", line 77, in train File "/home/wsjc/S2021/songjl/220430/yolox/YOLOX-main/yolox/core/trainer.py", line 88, in train_in_epoch File "/home/wsjc/S2021/songjl/220430/yolox/YOLOX-main/yolox/core/trainer.py", line 237, in after_epoch File "/home/wsjc/S2021/songjl/220430/yolox/YOLOX-main/yolox/core/trainer.py", line 355, in evaluate_and_save_model File "/home/wsjc/S2021/songjl/220430/yolox/YOLOX-main/yolox/exp/yolox_base.py", line 353, in eval File "/home/wsjc/S2021/songjl/220430/yolox/YOLOX-main/yolox/evaluators/voc_evaluator.py", line 114, in evaluate File "/home/wsjc/S2021/songjl/220430/yolox/YOLOX-main/yolox/evaluators/voc_evaluator.py", line 186, in evaluate_prediction File "/home/wsjc/S2021/songjl/220430/yolox/YOLOX-main/yolox/data/datasets/voc.py", line 230, in evaluate_detections File "/home/wsjc/S2021/songjl/220430/yolox/YOLOX-main/yolox/data/datasets/voc.py", line 264, in _write_voc_results_file ValueError: operands could not be broadcast together with shapes (11,5) (0,) |
把if dets == []:改成if(dets.shape[0]==0): |
2024-10-13 23:12:30 | ERROR | yolox.core.launch:98 - An error has been caught in function 'launch', process 'MainProcess' (14668), thread 'MainThread' (35416):
Traceback (most recent call last):
File "D:\Gugexaizai\YOLOX-0.2.0\tools\train.py", line 129, in
launch(
└ <function launch at 0x000001950AB11870>
File "D:\Gugexaizai\YOLOX-0.2.0\tools\train.py", line 114, in main
trainer.train()
│ └ <function Trainer.train at 0x000001950BF2AD40>
└ <yolox.core.trainer.Trainer object at 0x000001950BF77010>
File "D:\Gugexaizai\YOLOX-0.2.0\yolox\core\trainer.py", line 72, in train
self.train_in_epoch()
│ └ <function Trainer.train_in_epoch at 0x000001950BF51120>
└ <yolox.core.trainer.Trainer object at 0x000001950BF77010>
File "D:\Gugexaizai\YOLOX-0.2.0\yolox\core\trainer.py", line 82, in train_in_epoch
self.after_epoch()
│ └ <function Trainer.after_epoch at 0x000001950BFAAC20>
└ <yolox.core.trainer.Trainer object at 0x000001950BF77010>
File "D:\Gugexaizai\YOLOX-0.2.0\yolox\core\trainer.py", line 207, in after_epoch
self.evaluate_and_save_model()
│ └ <function Trainer.evaluate_and_save_model at 0x000001950BFAAEF0>
└ <yolox.core.trainer.Trainer object at 0x000001950BF77010>
File "D:\Gugexaizai\YOLOX-0.2.0\yolox\core\trainer.py", line 302, in evaluate_and_save_model
ap50_95, ap50, summary = self.exp.eval(
│ │ └ <function Exp.eval at 0x000001950BFABD90>
│ └ ╒══════════════════╤═════════════════════════════════════════════════════════════════════════════════════════════════════════...
└ <yolox.core.trainer.Trainer object at 0x000001950BF77010>
File "D:\Gugexaizai\YOLOX-0.2.0\yolox\exp\yolox_base.py", line 285, in eval
return evaluator.evaluate(model, is_distributed, half)
│ │ │ │ └ False
│ │ │ └ False
│ │ └ YOLOX(
│ │ (backbone): YOLOPAFPN(
│ │ (backbone): CSPDarknet(
│ │ (stem): Focus(
│ │ (conv): BaseConv(
│ │ (conv): ...
│ └ <function VOCEvaluator.evaluate at 0x000001950BFA9D80>
└ <yolox.evaluators.voc_evaluator.VOCEvaluator object at 0x0000019514545810>
File "D:\Gugexaizai\YOLOX-0.2.0\yolox\evaluators\voc_evaluator.py", line 128, in evaluate
eval_results = self.evaluate_prediction(data_list, statistics)
│ │ │ └ tensor([ 1.0139, 0.1483, 15.0000], device='cuda:0')
│ │ └ {0: (None, None, None), 1: (None, None, None), 2: (None, None, None), 3: (None, None, None), 4: (None, None, None), 5: (None,...
│ └ <function VOCEvaluator.evaluate_prediction at 0x000001950BFA9EA0>
└ <yolox.evaluators.voc_evaluator.VOCEvaluator object at 0x0000019514545810>
File "D:\Gugexaizai\YOLOX-0.2.0\yolox\evaluators\voc_evaluator.py", line 205, in evaluate_prediction
mAP50, mAP70 = self.dataloader.dataset.evaluate_detections(
│ │ │ └ <function VOCDetection.evaluate_detections at 0x000001950BFAA710>
│ │ └ <yolox.data.datasets.voc.VOCDetection object at 0x0000019514585390>
│ └ <torch.utils.data.dataloader.DataLoader object at 0x00000195145449D0>
└ <yolox.evaluators.voc_evaluator.VOCEvaluator object at 0x0000019514545810>
File "D:\Gugexaizai\YOLOX-0.2.0\yolox\data\datasets\voc.py", line 265, in evaluate_detections
self._write_voc_results_file(all_boxes)
│ │ └ [[array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), array([], shape=(0, 5), dtype=float32), arr...
│ └ <function VOCDetection._write_voc_results_file at 0x000001950BFAA830>
└ <yolox.data.datasets.voc.VOCDetection object at 0x0000019514585390>
File "D:\Gugexaizai\YOLOX-0.2.0\yolox\data\datasets\voc.py", line 299, in _write_voc_results_file
if dets == []:
└ array([], shape=(0, 5), dtype=float32)
ValueError: operands could not be broadcast together with shapes (0,5) (0,)
The text was updated successfully, but these errors were encountered: