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

Parsing with a trained parser: load the pre-trained model #5

Open
chenfeng15a opened this issue Nov 21, 2019 · 2 comments
Open

Parsing with a trained parser: load the pre-trained model #5

chenfeng15a opened this issue Nov 21, 2019 · 2 comments

Comments

@chenfeng15a
Copy link

chenfeng15a commented Nov 21, 2019

Hi, Cartus:
When I run:

python3 train.py --load_model 1 --model result/pretrain14.model --dev_file data/test.transitions --gold_AMR_dev ../jamr/scripts/test/amr.txt

Bug occurs:

[dynet] random seed: 615808844
[dynet] allocating memory: 512MB
[dynet] memory allocation done.
0...
done reading training actions file
#sents: 2
#tokens: 46
#types: 36
#POStags: 13
#actions: 42
#preds: 35
0...
done reading training actions file
#sents: 2
#tokens: 29
#types: 36
#POStags: 19
#actions: 43
#action types: 8
#preds: 36
Start loading preds
#lemmas with associated PR acts = 25
creating dictionary of pretrain embeddings
finish creating
UNK index in tok_dict_pretrain: 0
UNK index in tok_dict_all: 0
0...
done loading raw sent
#sents: 2
0...
done loading raw sent
#sents: 2
Rand word embedding size: 36
Pretrained word embedding size: 55
loading pretrained word embeddings
finish loading
loading pretrained model
Traceback (most recent call last):
File "train.py", line 227, in
parser.load_model(args.model)
File "/home/chenfeng/parser/AMR-cartus/model/stack_lstm.py", line 109, in load_model
self.pc.populate(filename)
File "_dynet.pyx", line 1461, in _dynet.ParameterCollection.populate
File "_dynet.pyx", line 1516, in _dynet.ParameterCollection.populate_from_textfile
RuntimeError: Dimensions of parameter /_24 looked up from file ({8557,200}) do not match parameters to be populated ({44,200})

Asking for your help. Thanks a lot!

@Cartus
Copy link
Owner

Cartus commented Nov 28, 2019

I see. That should be a bug. I am afraid that I am not able to fix it now since I am working for the deadline. Hopefully, I can fix these bugs and release a new pre-trained model in late December.

Sorry for the inconvenience caused.

@chenfeng15a
Copy link
Author

chenfeng15a commented Dec 1, 2019 via email

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