Skip to content
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后的验证部分报错了,报错情况如下 #52

Open
jjxyhb opened this issue Oct 25, 2024 · 0 comments

Comments

@jjxyhb
Copy link

jjxyhb commented Oct 25, 2024

             Class     Images  Instances      Box(P          R      mAP50  mAP50-95): 100%|██████████| 625/625 [02:22<00:00,  4.40it/s]

Traceback (most recent call last):
File "/home/dell/CV408/hb/Mamba-YOLO/mbyolo_train.py", line 44, in
"train": YOLO(model_conf).train(**args),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dell/CV408/hb/Mamba-YOLO/ultralytics/engine/model.py", line 674, in train
self.trainer.train()
File "/home/dell/CV408/hb/Mamba-YOLO/ultralytics/engine/trainer.py", line 199, in train
self._do_train(world_size)
File "/home/dell/CV408/hb/Mamba-YOLO/ultralytics/engine/trainer.py", line 424, in _do_train
self.metrics, self.fitness = self.validate()
^^^^^^^^^^^^^^^
File "/home/dell/CV408/hb/Mamba-YOLO/ultralytics/engine/trainer.py", line 565, in validate
metrics = self.validator(self)
^^^^^^^^^^^^^^^^^^^^
File "/home/dell/anaconda3/envs/mambayolo/lib/python3.11/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/dell/CV408/hb/Mamba-YOLO/ultralytics/engine/validator.py", line 195, in call
stats = self.get_stats()
^^^^^^^^^^^^^^^^
File "/home/dell/CV408/hb/Mamba-YOLO/ultralytics/models/yolo/detect/val.py", line 172, in get_stats
stats = {k: torch.cat(v, 0).cpu().numpy() for k, v in self.stats.items()} # to numpy
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dell/CV408/hb/Mamba-YOLO/ultralytics/models/yolo/detect/val.py", line 172, in
stats = {k: torch.cat(v, 0).cpu().numpy() for k, v in self.stats.items()} # to numpy
^^^^^^^^^^^^^^^
RuntimeError: torch.cat(): expected a non-empty list of Tensors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant