-
-
Notifications
You must be signed in to change notification settings - Fork 629
tensorflow.python.framework.errors_impl.InvalidArgumentError: indices[4,0] = 10000 is not in [0, 10000) #1
Comments
the same to you InvalidArgumentError (see above for traceback): indices[7,0] = 10000 is not in [0, 10000) |
Found the error. I used an wrong input_dim. It should be maximum integer index + 1 as explained in the Keras documentation and I just used the maximum integer index. Sorry for not answering earlier but I completely overlooked the issues. Furthermore it looks like this error only occurres when using a CPU and therefore it worked just fine for me. Now(after the bug fix) I tried it with both CPU and GPU and it works fine for me. Kind regards, |
Hi @TannerGilbert,
n_users = len(dataset.UserID.unique())
print(n_users) #12915
n_books = len(dataset.BookID.unique())
print(n_books) #4469
InvalidArgumentError: indices[0,0] = 114530 is not in [0, 4470)
[[{{node Book-Embedding_4/embedding_lookup}}]] Let me know if you have any idea about this issue. Thanks, |
Hello @bhansa, This error occurres when using the false input_dim for the embedding layers. The input_dim attribute for the embedding layer in Keras is defined as follows:
Maybe you need to add 1 as indicated above. Check out this stackoverflow post for more information. Hope this helped. |
Hi Gilbert,
Have u encountered this problem? i have not changed ur codes, and run it on local.
Thanks
The text was updated successfully, but these errors were encountered: