size mismatch for blink_encoder.1.weight
Training of head went well. After that, when I train torso, it reports the following:
Traceback (most recent call last): File "/root/autodl-tmp/GeneFacePlusPlus/utils/commons/trainer.py", line 150, in fit self.run_single_process(self.task) File "/root/autodl-tmp/GeneFacePlusPlus/utils/commons/trainer.py", line 200, in run_single_process model = task.build_model() File "/root/autodl-tmp/GeneFacePlusPlus/tasks/radnerfs/radnerf_torso_sr.py", line 69, in build_model load_ckpt(head_model, hparams['head_model_dir'], strict=True) File "/root/autodl-tmp/GeneFacePlusPlus/utils/commons/ckpt_utils.py", line 67, in load_ckpt cur_model.load_state_dict(state_dict, strict=strict) File "/root/miniconda3/envs/gf/lib/python3.10/site-packages/torch/nn/modules/module.py", line 2041, in load_state_dict raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for RADNeRFwithSR: size mismatch for blink_encoder.1.weight: copying a param with shape torch.Size([2, 32]) from checkpoint, the shape in current model is torch.Size([4, 32]). size mismatch for blink_encoder.1.bias: copying a param with shape torch.Size([2]) from checkpoint, the shape in current model is torch.Size([4]).
probably because of the mismatch of "eye_blink_dim" in config file egs/datasets/May/lm3d_radnerf_torso_sr.yaml and egs/datasets/May/lm3d_radnerf_sr.yaml. It seems lm3d_radnerf_sr.yaml was modified in revision #f9722c5 and lm3d_radnerf_torso_sr.yaml is not modified accordingly.
eye_blink_dim: 2 in lm3d_radnerf_sr.yaml eye_blink_dim: 4 in lm3d_radnerf_torso_sr.yaml
I solved this problem by changing the eye_blink_dim in lm3d_radnerf_torso_sr.yaml to 2
I solved this problem by changing the eye_blink_dim in lm3d_radnerf_torso_sr.yaml to 2
this method solved my problem