You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I've combined all your python scripts into one jupyter file and am trying to run them. Sometimes i get this "IndexError: index 0 is out of bounds for axis 0 with size 0" error and at other times it trains the model successfully. What seems to be the problem?
The text was updated successfully, but these errors were encountered:
It's occuring in the "getTrainingBatch()" function. I've added another argument to the function but I don't believe that has anything to do with the error as the error is occuring at np.argwhere()..I think it's np.argwhere(example==EOStokenIndex)[0] is returning an empty array for some reason
So basically np.argwhere(example==EOStokenIndex) is returning you an empty array and you're seeing the error because we're trying to return the 0th index. So that line returning an empty array means that in at least one of the values (example is the name) inside the labels list does not have an end of sentence token. So you should check why that is the case. Normally this code should handle it since it adds an EOS token to the end, but there might be a possible issue in that you have a string of exactly maxLen length and then you can't really add an EOS token to the end of it. I'd start by printing out the example that is causing the error and then working from there.
Hi, I've combined all your python scripts into one jupyter file and am trying to run them. Sometimes i get this "IndexError: index 0 is out of bounds for axis 0 with size 0" error and at other times it trains the model successfully. What seems to be the problem?
The text was updated successfully, but these errors were encountered: