DavidGillsjo / polygon-HGT

Polygon Detection for Room Layout Estimation using Heterogenous Graphs and Wireframes
MIT License
25 stars 4 forks source link

model size mismatch #7

Open colasmile opened 10 months ago

colasmile commented 10 months ago

pls.help

I'm running the commands in "Run inference on test set with simulated wireframe": python test.py --config-file ../config-files/Pred-plane-from-GT-GNN.yaml CHECKPOINT ../data/model_sim_hgt.pth OUTPUT_DIR ../runs/test

but get this runtime error: 2023-12-08 18:16:52,349 srw-test INFO: Namespace(config_file='config-files/Pred-plane-from-GT-GNN.yaml', nbr_plots=5, img_folder=None, filenames=None, all=False, subsample=1, val=False, graph=False, disable_wandb=False, resume_wandb=False, skip_tb=False, write_latex=False, no_legend=False, opts=['CHECKPOINT', 'data/model_sim_hgt.pth', 'OUTPUT_DIR', 'runs/test']) 2023-12-08 18:16:52,349 srw-test INFO: Loaded configuration file config-files/Pred-plane-from-GT-GNN.yaml 2023-12-08 18:17:05,382 srw-0 INFO: Loading checkpoint from data/model_sim_hgt.pth Traceback (most recent call last): File "/polygon-HGT/test.py", line 965, in <module> test(0, *test_args) File "/polygon-HGT/test.py", line 875, in test tester.test_model(model_graph=args.graph) File "/polygon-HGT/test.py", line 715, in test_model model = self._load_model_from_cfg() File "/polygon-HGT/test.py", line 140, in _load_model_from_cfg checkpointer.load(f=self.cfg.CHECKPOINT, use_latest=False) File "/polygon-HGT/parsing/utils/checkpoint.py", line 69, in load self._load_model(checkpoint, transfer=transfer) File "/polygon-HGT/parsing/utils/checkpoint.py", line 129, in _load_model load_state_dict(self.model, state_dict, strict=not transfer) File "/polygon-HGT/parsing/utils/model_serialization.py", line 93, in load_state_dict model.load_state_dict(model_state_dict, strict=strict) File "/usr/local/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1667, in load_state_dict raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for PlaneFromGtDetector: size mismatch for plane_classifier.proposal_gnn.graph_model.convs.0.p_rel.junction__junction_line__line: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.proposal_gnn.graph_model.convs.0.p_rel.plane__plane_junction_hypothesis__junction: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.proposal_gnn.graph_model.convs.0.p_rel.plane__plane_line_hypothesis__line: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.proposal_gnn.graph_model.convs.0.p_rel.line__rev_junction_line__junction: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.proposal_gnn.graph_model.convs.0.p_rel.junction__rev_plane_junction_hypothesis__plane: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.proposal_gnn.graph_model.convs.0.p_rel.line__rev_plane_line_hypothesis__plane: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.proposal_gnn.graph_model.convs.0.p_rel.junction__self__junction: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.proposal_gnn.graph_model.convs.0.p_rel.line__self__line: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.proposal_gnn.graph_model.convs.0.p_rel.plane__self__plane: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.proposal_gnn.graph_model.convs.1.p_rel.junction__junction_line__line: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.proposal_gnn.graph_model.convs.1.p_rel.plane__plane_junction_hypothesis__junction: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.proposal_gnn.graph_model.convs.1.p_rel.plane__plane_line_hypothesis__line: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.proposal_gnn.graph_model.convs.1.p_rel.line__rev_junction_line__junction: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.proposal_gnn.graph_model.convs.1.p_rel.junction__rev_plane_junction_hypothesis__plane: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.proposal_gnn.graph_model.convs.1.p_rel.line__rev_plane_line_hypothesis__plane: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.proposal_gnn.graph_model.convs.1.p_rel.junction__self__junction: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.proposal_gnn.graph_model.convs.1.p_rel.line__self__line: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.proposal_gnn.graph_model.convs.1.p_rel.plane__self__plane: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.proposal_gnn.graph_model.convs.2.p_rel.junction__junction_line__line: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.proposal_gnn.graph_model.convs.2.p_rel.plane__plane_junction_hypothesis__junction: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.proposal_gnn.graph_model.convs.2.p_rel.plane__plane_line_hypothesis__line: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.proposal_gnn.graph_model.convs.2.p_rel.line__rev_junction_line__junction: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.proposal_gnn.graph_model.convs.2.p_rel.junction__rev_plane_junction_hypothesis__plane: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.proposal_gnn.graph_model.convs.2.p_rel.line__rev_plane_line_hypothesis__plane: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.proposal_gnn.graph_model.convs.2.p_rel.junction__self__junction: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.proposal_gnn.graph_model.convs.2.p_rel.line__self__line: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.proposal_gnn.graph_model.convs.2.p_rel.plane__self__plane: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.final_gnn.graph_model.convs.0.p_rel.junction__junction_line__line: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.final_gnn.graph_model.convs.0.p_rel.plane__plane_junction_hypothesis__junction: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.final_gnn.graph_model.convs.0.p_rel.line__rev_junction_line__junction: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.final_gnn.graph_model.convs.0.p_rel.junction__rev_plane_junction_hypothesis__plane: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.final_gnn.graph_model.convs.0.p_rel.plane__plane_plane_channel__plane: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.final_gnn.graph_model.convs.0.p_rel.junction__self__junction: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.final_gnn.graph_model.convs.0.p_rel.line__self__line: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.final_gnn.graph_model.convs.0.p_rel.plane__self__plane: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.final_gnn.graph_model.convs.1.p_rel.junction__junction_line__line: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.final_gnn.graph_model.convs.1.p_rel.plane__plane_junction_hypothesis__junction: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.final_gnn.graph_model.convs.1.p_rel.line__rev_junction_line__junction: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.final_gnn.graph_model.convs.1.p_rel.junction__rev_plane_junction_hypothesis__plane: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.final_gnn.graph_model.convs.1.p_rel.plane__plane_plane_channel__plane: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.final_gnn.graph_model.convs.1.p_rel.junction__self__junction: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.final_gnn.graph_model.convs.1.p_rel.line__self__line: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.final_gnn.graph_model.convs.1.p_rel.plane__self__plane: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.final_gnn.graph_model.convs.2.p_rel.junction__junction_line__line: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.final_gnn.graph_model.convs.2.p_rel.plane__plane_junction_hypothesis__junction: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.final_gnn.graph_model.convs.2.p_rel.line__rev_junction_line__junction: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.final_gnn.graph_model.convs.2.p_rel.junction__rev_plane_junction_hypothesis__plane: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.final_gnn.graph_model.convs.2.p_rel.plane__plane_plane_channel__plane: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.final_gnn.graph_model.convs.2.p_rel.junction__self__junction: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.final_gnn.graph_model.convs.2.p_rel.line__self__line: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]). size mismatch for plane_classifier.final_gnn.graph_model.convs.2.p_rel.plane__self__plane: copying a param with shape torch.Size([8]) from checkpoint, the shape in current model is torch.Size([1, 8]).