lisa-groundhog / GroundHog

Library for implementing RNNs with Theano
BSD 3-Clause "New" or "Revised" License
599 stars 229 forks source link

How to initialize MultiLayer with existed parameters? #43

Closed zhangdongxu closed 8 years ago

zhangdongxu commented 8 years ago

For example initialing approx_embedder with pretrained word vectors. Any suggestion?

zhangdongxu commented 8 years ago

I achieve this by three steps: 1.Use preprocess.py and print vocab to know the word2id mapping. 2.Then save wordvector model with key "W_0_enc_approx_embdr" and "W_0_dec_approx_embdr". 3.Finally use lm_model.load('data/wordvector.npz') in the train.py