Keras-IndRNN
Keras-IndRNN copied to clipboard
Negative input error
Dear Majumdar, I used your code and works well. When I standadized my data between -1 and 1, it gives error:
InvalidArgumentError: indices[40,496] = -1 is not in [0, 20000) [[{{node embedding_3/embedding_lookup}}]]
I searched web and try different options, but I could not make it. Do you have any suggestion to correct it? Regards
Embedding lookup is done for the Keras Embedding layer, which I don't use in this model. It is likely an issue in your overall architecure.
Embedding layers accept only integer indices, not float values which is what the error is saying.
I have the same problem... It seems the embedding layer doesn't accept negative inputs, but I am not sure about it. The closest answer I read is that the value* you write in the 'input_dim' will limit your data value in the range [0,*). Negative values are not in this range so that they cause problems. So far, I have two ideas to solve it: Increase values of all data or change a machine learning method. If anyone knows how to solve the problems, please share solutions! I appreciate.