RangiLyu / nanodet

NanoDet-Plus⚡Super fast and lightweight anchor-free object detection model. 🔥Only 980 KB(int8) / 1.8MB (fp16) and run 97FPS on cellphone🔥
Apache License 2.0
5.63k stars 1.03k forks source link

训练问题 #535

Open xings-sdnu opened 9 months ago

xings-sdnu commented 9 months ago

Traceback (most recent call last): File "/home/sx/nanodet-main/tools/train.py", line 155, in main(args) File "/home/sx/nanodet-main/tools/train.py", line 150, in main trainer.fit(task, train_dataloader, val_dataloader, ckpt_path=model_resume_path) File "/home/sx/.conda/envs/nanodet/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 545, in fit call._call_and_handle_interrupt( File "/home/sx/.conda/envs/nanodet/lib/python3.8/site-packages/pytorch_lightning/trainer/call.py", line 43, in _call_and_handle_interrupt return trainer.strategy.launcher.launch(trainer_fn, *args, trainer=trainer, *kwargs) File "/home/sx/.conda/envs/nanodet/lib/python3.8/site-packages/pytorch_lightning/strategies/launchers/subprocess_script.py", line 102, in launch return function(args, **kwargs) File "/home/sx/.conda/envs/nanodet/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 581, in _fit_impl self._run(model, ckpt_path=ckpt_path) File "/home/sx/.conda/envs/nanodet/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 938, in _run _verify_loop_configurations(self) File "/home/sx/.conda/envs/nanodet/lib/python3.8/site-packages/pytorch_lightning/trainer/configuration_validator.py", line 37, in _verify_loop_configurations verify_train_val_loop_configuration(trainer, model) File "/home/sx/.conda/envs/nanodet/lib/python3.8/site-packages/pytorch_lightning/trainer/configuration_validator.py", line 81, in verify_train_val_loop_configuration raise NotImplementedError( NotImplementedError: Support for training_epoch_end has been removed in v2.0.0. TrainingTask implements this method. You can use the on_train_epoch_end hook instead. To access outputs, save them in-memory as instance attributes. You can find migration examples in https://github.com/Lightning-AI/lightning/pull/16520.

请问作者这是怎么回事?应该怎么修改?谢谢!