Hi,
I'm trying to get intuition in rnnlm and write your code from tutorial step by step.
Could you please clarify, why your code throws an exception:
"in calculate_total_loss
correct_word_predictions = o[np.arange(len(y)), y[i]]
IndexError: shape mismatch: indexing arrays could not be broadcast together with shapes (1000,) (20,) "?
I'm using python 3
Thanks in advance.
P.S.
It would be great if you also kindly clarify some points about your data file "reddit-comments-2015-08.csv":
As i understand, comments in csv file must be separated by double quotes, but it is wrong in your file.
Also i tried use just half of file content, but in that case i always get error:
"in
sentences = itertools.chain(*[nltk.sent_tokenize(x[0].lower()) for x in reader])
IndexError: list index out of range".
I would be appreciate if you kindly clarify these points.
Hi, I'm trying to get intuition in rnnlm and write your code from tutorial step by step. Could you please clarify, why your code throws an exception: "in calculate_total_loss correct_word_predictions = o[np.arange(len(y)), y[i]] IndexError: shape mismatch: indexing arrays could not be broadcast together with shapes (1000,) (20,) "? I'm using python 3
Thanks in advance.
P.S. It would be great if you also kindly clarify some points about your data file "reddit-comments-2015-08.csv":
I would be appreciate if you kindly clarify these points.