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

Load state dict error on trying to run training for material #23

Open
kashyappiyush1998 opened this issue Aug 22, 2023 · 1 comment
Open

Comments

@kashyappiyush1998
Copy link

train set len 99999999
100%|████████████████████████████████████████████████████████████████████████████████| 35/35 [00:00<00:00, 45044.69it/s]
val val set len 1
100%|████████████████████████████████████████████████████████████████████████████████| 35/35 [00:00<00:00, 31549.68it/s]
/home/piyush/anaconda3/envs/venv_nero/lib/python3.8/site-packages/torch/functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:3190.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
warn!!! the normals are flipped in NeuS by default. You may flip the normal according to your mesh!
data/model/shelf_1_shape/model.pth
Traceback (most recent call last):
File "run_training.py", line 10, in
Trainer(load_cfg(flags.cfg)).run()
File "/home/piyush/data/NeRO/train/trainer.py", line 104, in run
best_para,start_step=self._load_model()
File "/home/piyush/data/NeRO/train/trainer.py", line 181, in _load_model
self.network.load_state_dict(checkpoint['network_state_dict'])
File "/home/piyush/anaconda3/envs/venv_nero/lib/python3.8/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 NeROMaterialRenderer:
Missing key(s) in state_dict: "shader_network.light_pts", "shader_network.feats_network.module0.0.bias", "shader_network.feats_network.module0.0.weight_g", "shader_network.feats_network.module0.0.weight_v", "shader_network.feats_network.module0.2.bias", "shader_network.feats_network.module0.2.weight_g", "shader_network.feats_network.module0.2.weight_v", "shader_network.feats_network.module0.4.bias", "shader_network.feats_network.module0.4.weight_g", "shader_network.feats_network.module0.4.weight_v", "shader_network.feats_network.module0.6.bias", "shader_network.feats_network.module0.6.weight_g", "shader_network.feats_network.module0.6.weight_v", "shader_network.feats_network.module1.0.bias", "shader_network.feats_network.module1.0.weight_g", "shader_network.feats_network.module1.0.weight_v", "shader_network.feats_network.module1.2.bias", "shader_network.feats_network.module1.2.weight_g", "shader_network.feats_network.module1.2.weight_v", "shader_network.feats_network.module1.4.bias", "shader_network.feats_network.module1.4.weight_g", "shader_network.feats_network.module1.4.weight_v", "shader_network.feats_network.module1.6.bias", "shader_network.feats_network.module1.6.weight_g", "shader_network.feats_network.module1.6.weight_v", "shader_network.metallic_predictor.0.bias", "shader_network.metallic_predictor.0.weight_g", "shader_network.metallic_predictor.0.weight_v", "shader_network.metallic_predictor.2.bias", "shader_network.metallic_predictor.2.weight_g", "shader_network.metallic_predictor.2.weight_v", "shader_network.metallic_predictor.4.bias", "shader_network.metallic_predictor.4.weight_g", "shader_network.metallic_predictor.4.weight_v", "shader_network.metallic_predictor.6.bias", "shader_network.metallic_predictor.6.weight_g", "shader_network.metallic_predictor.6.weight_v", "shader_network.roughness_predictor.0.bias", "shader_network.roughness_predictor.0.weight_g", "shader_network.roughness_predictor.0.weight_v", "shader_network.roughness_predictor.2.bias", "shader_network.roughness_predictor.2.weight_g", "shader_network.roughness_predictor.2.weight_v", "shader_network.roughness_predictor.4.bias", "shader_network.roughness_predictor.4.weight_g", "shader_network.roughness_predictor.4.weight_v", "shader_network.roughness_predictor.6.bias", "shader_network.roughness_predictor.6.weight_g", "shader_network.roughness_predictor.6.weight_v", "shader_network.albedo_predictor.0.bias", "shader_network.albedo_predictor.0.weight_g", "shader_network.albedo_predictor.0.weight_v", "shader_network.albedo_predictor.2.bias", "shader_network.albedo_predictor.2.weight_g", "shader_network.albedo_predictor.2.weight_v", "shader_network.albedo_predictor.4.bias", "shader_network.albedo_predictor.4.weight_g", "shader_network.albedo_predictor.4.weight_v", "shader_network.albedo_predictor.6.bias", "shader_network.albedo_predictor.6.weight_g", "shader_network.albedo_predictor.6.weight_v", "shader_network.outer_light.0.bias", "shader_network.outer_light.0.weight_g", "shader_network.outer_light.0.weight_v", "shader_network.outer_light.2.bias", "shader_network.outer_light.2.weight_g", "shader_network.outer_light.2.weight_v", "shader_network.outer_light.4.bias", "shader_network.outer_light.4.weight_g", "shader_network.outer_light.4.weight_v", "shader_network.outer_light.6.bias", "shader_network.outer_light.6.weight_g", "shader_network.outer_light.6.weight_v", "shader_network.human_light.0.bias", "shader_network.human_light.0.weight_g", "shader_network.human_light.0.weight_v", "shader_network.human_light.2.bias", "shader_network.human_light.2.weight_g", "shader_network.human_light.2.weight_v", "shader_network.human_light.4.bias", "shader_network.human_light.4.weight_g", "shader_network.human_light.4.weight_v", "shader_network.human_light.6.bias", "shader_network.human_light.6.weight_g", "shader_network.human_light.6.weight_v", "shader_network.inner_light.0.bias", "shader_network.inner_light.0.weight_g", "shader_network.inner_light.0.weight_v", "shader_network.inner_light.2.bias", "shader_network.inner_light.2.weight_g", "shader_network.inner_light.2.weight_v", "shader_network.inner_light.4.bias", "shader_network.inner_light.4.weight_g", "shader_network.inner_light.4.weight_v", "shader_network.inner_light.6.bias", "shader_network.inner_light.6.weight_g", "shader_network.inner_light.6.weight_v".
Unexpected key(s) in state_dict: "sdf_network.lin0.bias", "sdf_network.lin0.weight_g", "sdf_network.lin0.weight_v", "sdf_network.lin1.bias", "sdf_network.lin1.weight_g", "sdf_network.lin1.weight_v", "sdf_network.lin2.bias", "sdf_network.lin2.weight_g", "sdf_network.lin2.weight_v", "sdf_network.lin3.bias", "sdf_network.lin3.weight_g", "sdf_network.lin3.weight_v", "sdf_network.lin4.bias", "sdf_network.lin4.weight_g", "sdf_network.lin4.weight_v", "sdf_network.lin5.bias", "sdf_network.lin5.weight_g", "sdf_network.lin5.weight_v", "sdf_network.lin6.bias", "sdf_network.lin6.weight_g", "sdf_network.lin6.weight_v", "sdf_network.lin7.bias", "sdf_network.lin7.weight_g", "sdf_network.lin7.weight_v", "sdf_network.lin8.bias", "sdf_network.lin8.weight_g", "sdf_network.lin8.weight_v", "deviation_network.variance", "outer_nerf.pts_linears.0.weight", "outer_nerf.pts_linears.0.bias", "outer_nerf.pts_linears.1.weight", "outer_nerf.pts_linears.1.bias", "outer_nerf.pts_linears.2.weight", "outer_nerf.pts_linears.2.bias", "outer_nerf.pts_linears.3.weight", "outer_nerf.pts_linears.3.bias", "outer_nerf.pts_linears.4.weight", "outer_nerf.pts_linears.4.bias", "outer_nerf.pts_linears.5.weight", "outer_nerf.pts_linears.5.bias", "outer_nerf.pts_linears.6.weight", "outer_nerf.pts_linears.6.bias", "outer_nerf.pts_linears.7.weight", "outer_nerf.pts_linears.7.bias", "outer_nerf.views_linears.0.weight", "outer_nerf.views_linears.0.bias", "outer_nerf.feature_linear.weight", "outer_nerf.feature_linear.bias", "outer_nerf.alpha_linear.weight", "outer_nerf.alpha_linear.bias", "outer_nerf.rgb_linear.weight", "outer_nerf.rgb_linear.bias", "color_network.FG_LUT", "color_network.metallic_predictor.0.bias", "color_network.metallic_predictor.0.weight_g", "color_network.metallic_predictor.0.weight_v", "color_network.metallic_predictor.2.bias", "color_network.metallic_predictor.2.weight_g", "color_network.metallic_predictor.2.weight_v", "color_network.metallic_predictor.4.bias", "color_network.metallic_predictor.4.weight_g", "color_network.metallic_predictor.4.weight_v", "color_network.metallic_predictor.6.bias", "color_network.metallic_predictor.6.weight_g", "color_network.metallic_predictor.6.weight_v", "color_network.roughness_predictor.0.bias", "color_network.roughness_predictor.0.weight_g", "color_network.roughness_predictor.0.weight_v", "color_network.roughness_predictor.2.bias", "color_network.roughness_predictor.2.weight_g", "color_network.roughness_predictor.2.weight_v", "color_network.roughness_predictor.4.bias", "color_network.roughness_predictor.4.weight_g", "color_network.roughness_predictor.4.weight_v", "color_network.roughness_predictor.6.bias", "color_network.roughness_predictor.6.weight_g", "color_network.roughness_predictor.6.weight_v", "color_network.albedo_predictor.0.bias", "color_network.albedo_predictor.0.weight_g", "color_network.albedo_predictor.0.weight_v", "color_network.albedo_predictor.2.bias", "color_network.albedo_predictor.2.weight_g", "color_network.albedo_predictor.2.weight_v", "color_network.albedo_predictor.4.bias", "color_network.albedo_predictor.4.weight_g", "color_network.albedo_predictor.4.weight_v", "color_network.albedo_predictor.6.bias", "color_network.albedo_predictor.6.weight_g", "color_network.albedo_predictor.6.weight_v", "color_network.outer_light.0.bias", "color_network.outer_light.0.weight_g", "color_network.outer_light.0.weight_v", "color_network.outer_light.2.bias", "color_network.outer_light.2.weight_g", "color_network.outer_light.2.weight_v", "color_network.outer_light.4.bias", "color_network.outer_light.4.weight_g", "color_network.outer_light.4.weight_v", "color_network.outer_light.6.bias", "color_network.outer_light.6.weight_g", "color_network.outer_light.6.weight_v", "color_network.inner_light.0.bias", "color_network.inner_light.0.weight_g", "color_network.inner_light.0.weight_v", "color_network.inner_light.2.bias", "color_network.inner_light.2.weight_g", "color_network.inner_light.2.weight_v", "color_network.inner_light.4.bias", "color_network.inner_light.4.weight_g", "color_network.inner_light.4.weight_v", "color_network.inner_light.6.bias", "color_network.inner_light.6.weight_g", "color_network.inner_light.6.weight_v", "color_network.inner_weight.0.bias", "color_network.inner_weight.0.weight_g", "color_network.inner_weight.0.weight_v", "color_network.inner_weight.2.bias", "color_network.inner_weight.2.weight_g", "color_network.inner_weight.2.weight_v", "color_network.inner_weight.4.bias", "color_network.inner_weight.4.weight_g", "color_network.inner_weight.4.weight_v", "color_network.inner_weight.6.bias", "color_network.inner_weight.6.weight_g", "color_network.inner_weight.6.weight_v", "color_network.human_light_predictor.0.bias", "color_network.human_light_predictor.0.weight_g", "color_network.human_light_predictor.0.weight_v", "color_network.human_light_predictor.2.bias", "color_network.human_light_predictor.2.weight_g", "color_network.human_light_predictor.2.weight_v", "color_network.human_light_predictor.4.bias", "color_network.human_light_predictor.4.weight_g", "color_network.human_light_predictor.4.weight_v", "color_network.human_light_predictor.6.bias", "color_network.human_light_predictor.6.weight_g", "color_network.human_light_predictor.6.weight_v".
(venv_nero) piyush@DESKTOP-UBHATCJ:~/data/NeRO$ python extract_mesh.py --cfg configs/custom/shelf_shape.yaml
successfully load shelf_1_shape step 100000!
/home/piyush/anaconda3/envs/venv_nero/lib/python3.8/site-packages/torch/functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:3190.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]

@liuyuan-pal
Copy link
Owner

Hi, thanks for trying our codes. Maybe you need to change the name of the config.

name: kettle_material

It will automatically load ckpt in data/model/<name>.

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

2 participants