mila-iqia / blocks-examples

Examples and scripts using Blocks
MIT License
147 stars 94 forks source link

Enabling weight_noise_ff makes machine translation example crash #81

Open vitaka opened 8 years ago

vitaka commented 8 years ago

Hello,

While playing with the machine translation example I came across an unexpected crash. I tried to enable weight noise as done in the paper "On Using Monolingual Corpora in Neural Machine Translation". I assigned a value higher than 0 to the configuration parameter "weight_noise_ff" and got a crash in line 78 of init.py:

enc_params = Selector(encoder.lookup).get_params().values()

I replaced get_params() with get_params(), according to the API documentation, but then I get the following error:

File "machine_translation/init.py", line 85, in main dec_params += Selector(decoder.state_init).get_parameters().values() AttributeError: 'Decoder' object has no attribute 'state_init'

Any advice?

Thanks in advance