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

Error while th train.lua -config config-train : inconsistent tensor size, expected tensor [45004 x 300] and src [45004 x 100] to have the same number of elements, but got 13501200 and 4500400 elements respectively at */*/torch/pkg/torch/lib/TH/generic/THTensorCopy.c:120

vedarddy opened this issue · comments

This is the error I get when I try to train the model! Please help!

I also got the same error. Have you solved it already?
If so, could you mind to teach me how to solve it?
Thank you very much. @vedarddy

@vedarddy @wentsun12 I think i solved it. I changed the word_vec_size to 100 instead of 300 and right now its training the model. So I think that did the trick.

Normally the word_vec_size=300 works fine, I've done the implementation.
But I already had this issue when I misunderstood the <path to embedding txt file>. I thought it's the path to the input file but it turns out that it is the path to the file we have to download from https://nlp.stanford.edu/projects/glove/ which name is glove.840B.300d.zip (about 2Go).
The input file is rather given in the Generating step where you change src=... in the config-trans file to src=path_to_your_input_sentence_text_file

hi,body,I'd like to ask for ,what I should put in ther?Do me a favor ,please.