retinanet-lightning/retinanet/models.py", line 319, in validation_epoch_end avg_reg_loss = avg_cls_loss[ | IndexError: too many indices for tensor of dimension 0 #5
Traceback (most recent call last):███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 324/324 [00:44<00:00, 7.29it/s]
File "train.py", line 77, in <module>
main()
File "train.py", line 68, in main
trainer.fit(model, dm)
File "/home/egorundel/venvs/retinanet-lightning/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 603, in fit
call._call_and_handle_interrupt(
File "/home/egorundel/venvs/retinanet-lightning/lib/python3.8/site-packages/pytorch_lightning/trainer/call.py", line 38, in _call_and_handle_interrupt
return trainer_fn(*args, **kwargs)
File "/home/egorundel/venvs/retinanet-lightning/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 645, in _fit_impl
self._run(model, ckpt_path=self.ckpt_path)
File "/home/egorundel/venvs/retinanet-lightning/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1098, in _run
results = self._run_stage()
File "/home/egorundel/venvs/retinanet-lightning/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1177, in _run_stage
self._run_train()
File "/home/egorundel/venvs/retinanet-lightning/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1200, in _run_train
self.fit_loop.run()
File "/home/egorundel/venvs/retinanet-lightning/lib/python3.8/site-packages/pytorch_lightning/loops/loop.py", line 199, in run
self.advance(*args, **kwargs)
File "/home/egorundel/venvs/retinanet-lightning/lib/python3.8/site-packages/pytorch_lightning/loops/fit_loop.py", line 267, in advance
self._outputs = self.epoch_loop.run(self._data_fetcher)
File "/home/egorundel/venvs/retinanet-lightning/lib/python3.8/site-packages/pytorch_lightning/loops/loop.py", line 200, in run
self.on_advance_end()
File "/home/egorundel/venvs/retinanet-lightning/lib/python3.8/site-packages/pytorch_lightning/loops/epoch/training_epoch_loop.py", line 251, in on_advance_end
self._run_validation()
File "/home/egorundel/venvs/retinanet-lightning/lib/python3.8/site-packages/pytorch_lightning/loops/epoch/training_epoch_loop.py", line 310, in _run_validation
self.val_loop.run()
File "/home/egorundel/venvs/retinanet-lightning/lib/python3.8/site-packages/pytorch_lightning/loops/loop.py", line 206, in run
output = self.on_run_end()
File "/home/egorundel/venvs/retinanet-lightning/lib/python3.8/site-packages/pytorch_lightning/loops/dataloader/evaluation_loop.py", line 180, in on_run_end
self._evaluation_epoch_end(self._outputs)
File "/home/egorundel/venvs/retinanet-lightning/lib/python3.8/site-packages/pytorch_lightning/loops/dataloader/evaluation_loop.py", line 288, in _evaluation_epoch_end
self.trainer._call_lightning_module_hook(hook_name, output_or_outputs)
File "/home/egorundel/venvs/retinanet-lightning/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1342, in _call_lightning_module_hook
output = fn(*args, **kwargs)
File "/home/egorundel/projects/retinanet-lightning/retinanet/models.py", line 319, in validation_epoch_end
avg_reg_loss = avg_cls_loss[
IndexError: too many indices for tensor of dimension 0
Hello, can you tell me what the problem might be?
Here is a screenshot with the error:
My system:
RTX 3060 CUDA 11.1
My installed pip packages: