RNet-pytorch
RNet-pytorch copied to clipboard
test() fails
This is the most transparent implementation of RNet I have found, however it fails on testing. I get the following error message:
File "main.py", line 117, in get_anwser ans_.append(passage[i+t]) IndexError: list index out of range
It looks like the obtained indexes i and j do not correspond to the passage that is currently being tested.
Let's say they are multiple passages in one tested batch and the size of the longest passage equals S. i and j are always in range 0 to (S-1). But some passages are shorter than S and that's why it fails sometimes.
Am I missing something? I would really appreciate any follow up on this!