Skip to content

Saved state size differences #16

Description

@owanr

I ran the following
python chsmm.py -data data/labee2e/ -emb_size 300 -hid_size 300 -layers 1 -dropout 0.3 -K 60 -L 4 -log_interval 100 -thresh 9 -lr 0.5 -sep_attn -unif_lenps -emb_drop -mlpinp -onmt_decay -one_rnn -max_pool -gen_from_fi data/labee2e/src_uniq_valid.txt -load models/e2e-60-1-far.pt -tagged_fi segs/seg-e2e-60-1-far.txt -beamsz 5 -ntemplates 100 -gen_wts '1,1' -cuda -min_gen_tokes 0

and got the following error
Traceback (most recent call last): File "chsmm.py", line 974, in <module> net.load_state_dict(saved_state, strict=False) File "/home/user/venv/lib/python3.6/site-packages/torch/nn/modules/module.py", line 847, in load_state_dict self.__class__.__name__, "\n\t".join(error_msgs))) RuntimeError: Error(s) in loading state_dict for HSMM: size mismatch for lut.weight: copying a param with shape torch.Size([872, 300]) from checkpoint, the shape in current model is torch.Size([3018, 300]). size mismatch for decoder.weight: copying a param with shape torch.Size([781, 600]) from checkpoint, the shape in current model is torch.Size([2954, 600]). size mismatch for decoder.bias: copying a param with shape torch.Size([781]) from checkpoint, the shape in current model is torch.Size([2954]).

It looks like the saved_state dictionary is coming from the e2e-60-1-far.pt file I downloaded from this Github page, so I'm not quite sure what I'm doing wrong. I'm also using the provided data and segs files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions