tteepe / GaitGraph2

Official code for "Towards a Deeper Understanding of Skeleton-based Gait Recognition" (CVPRW'22)
40 stars 11 forks source link

KeyError: 'test_loop' #21

Open AhsanBilal7 opened 1 year ago

AhsanBilal7 commented 1 year ago

I am getting the error during testing the pretrained model LOCAL_RANK: 0 - CUDA_VISIBLE_DEVICES: [0] Traceback (most recent call last): File "D:\FYP\GaitGraph2\GaitGraph\gaitgraph_casia_b.py", line 317, in cli_main() File "D:\FYP\GaitGraph2\GaitGraph\gaitgraph_casia_b.py", line 307, in cli_main LightningCLI( File "C:\Users\Pc\miniconda3\envs\hrnet\lib\site-packages\pytorch_lightning\cli.py", line 353, in init self._run_subcommand(self.subcommand) File "C:\Users\Pc\miniconda3\envs\hrnet\lib\site-packages\pytorch_lightning\cli.py", line 642, in _run_subcommand fn(*fn_kwargs) File "C:\Users\Pc\miniconda3\envs\hrnet\lib\site-packages\pytorch_lightning\trainer\trainer.py", line 737, in test return call._call_and_handle_interrupt( File "C:\Users\Pc\miniconda3\envs\hrnet\lib\site-packages\pytorch_lightning\trainer\call.py", line 42, in _call_and_handle_interrupt return trainer_fn(args, **kwargs) File "C:\Users\Pc\miniconda3\envs\hrnet\lib\site-packages\pytorch_lightning\trainer\trainer.py", line 780, in _test_impl results = self._run(model, ckpt_path=ckpt_path) File "C:\Users\Pc\miniconda3\envs\hrnet\lib\site-packages\pytorch_lightning\trainer\trainer.py", line 966, in _run self._checkpoint_connector.restore_training_state() File "C:\Users\Pc\miniconda3\envs\hrnet\lib\site-packages\pytorch_lightning\trainer\connectors\checkpoint_connector.py", line 292, in restore_training_state self.restore_loops() File "C:\Users\Pc\miniconda3\envs\hrnet\lib\site-packages\pytorch_lightning\trainer\connectors\checkpoint_connector.py", line 336, in restore_loops self.trainer.test_loop.load_state_dict(state_dict["test_loop"]) KeyError: 'test_loop'

weishiguan commented 7 months ago

Is the landlord's problem solved, I also encountered a similar problem, I hope to get help, thank you very much!!

AhsanBilal7 commented 7 months ago

I have implemented my data loading pipeline with simple pytorch instead of pytorch lightning. But I guess this error is due to the configuration passed to load the pretrained weights