Skip to content

[FastPitch/Pytorch] size mismatch for embedding.weight #610

@Truong-Thanh-Quang

Description

@Truong-Thanh-Quang

I use my own pretrained Tacotron2 model FP16 to run extract mels. Error occured:

Traceback (most recent call last):
File "extract_mels.py", line 290, in
main()
File "extract_mels.py", line 199, in main
forward_is_infer=False, ema=False)
File "/workspace/fastpitch/inference.py", line 135, in load_and_setup_model
status += ' ' + str(model.load_state_dict(sd, strict=False))
File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py", line 879, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for Tacotron2:
size mismatch for embedding.weight: copying a param with shape torch.Size([199, 512]) from checkpoint, the shape in current model is torch.Size([148, 512]).

Please help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions