Skip to content

使用train训练出来的模型在demo中加载失败 #40

@Barry1915

Description

@Barry1915

RuntimeError: Error(s) in loading state_dict for CRNN:
size mismatch for rnn.0.rnn.weight_ih_l0: copying a param with shape torch.Size([512, 512]) from checkpoint, the shape in current model is torch.Size([1024, 512]).
size mismatch for rnn.0.rnn.weight_hh_l0: copying a param with shape torch.Size([512, 128]) from checkpoint, the shape in current model is torch.Size([1024, 256]).
size mismatch for rnn.0.rnn.bias_ih_l0: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([1024]).
size mismatch for rnn.0.rnn.bias_hh_l0: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([1024]).
size mismatch for rnn.0.rnn.weight_ih_l0_reverse: copying a param with shape torch.Size([512, 512]) from checkpoint, the shape in current model is torch.Size([1024, 512]).
size mismatch for rnn.0.rnn.weight_hh_l0_reverse: copying a param with shape torch.Size([512, 128]) from checkpoint, the shape in current model is torch.Size([1024, 256]).
size mismatch for rnn.0.rnn.bias_ih_l0_reverse: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([1024]).
size mismatch for rnn.0.rnn.bias_hh_l0_reverse: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([1024]).
size mismatch for rnn.0.embedding.weight: copying a param with shape torch.Size([77, 256]) from checkpoint, the shape in current model is torch.Size([37, 512]).
size mismatch for rnn.0.embedding.bias: copying a param with shape torch.Size([77]) from checkpoint, the shape in current model is torch.Size([37]).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions