xinyadu / nqg

neural question generation for reading comprehension

Home Page:https://arxiv.org/abs/1705.00106

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ParaSentDecoder hidden dim is nil while using pretrained checkpoints

payalbajaj opened this issue · comments

In ParaSentDecoder, h_dim is not in self.args, thus it is not saved in the checkpoint - because only self.args is saved. Due to this, the shape of gradContextInput (https://github.com/xinyadu/nqg/blob/master/paragraph/onmt/modules/ParaSentDecoder.lua#L327) is incorrect and creates bad argument error on updating gradients using gradContextInput:add(gradInput[self.args.inputIndex.context]) (https://github.com/xinyadu/nqg/blob/master/paragraph/onmt/modules/ParaSentDecoder.lua#L354)