localminimum / localminimum/R-net
InvalidArgumentError (see above for traceback): **indices[6,4]** = 23624 is not in [0, 23624)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 319
- Forks
- 121
- PR merge metrics
- No merged PRs in 30d
Description
I get the following error after running an embedding layer as;
Embedding(23624, 50, input_length=5, trainable=False)
InvalidArgumentError (see above for traceback): indices[6,4] = 23624 is not in [0, 23624)
[[Node: embedding_1/embedding_lookup = Gather[Tindices=DT_INT32, Tparams=DT_FLOAT, _class=["loc:@embedding_1/embeddings"], validate_indices=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"](embedding_1/embeddings/read, embedding_1/Cast)]]
Each datapoint here is a number(index). Upon checking indices[6,4] I found the following
print(ar_train_data[6,4])
5088
ar_train_data is an array of shape (162896, 5) where each value is between [0, 23624).
The training stops towards the end of the first epoch with the error above.
Am amazed! 5088 is no where out of range for [0, 23624). Can anyone suggest what could be the issue here?
Please suggest if additional code snippets are required for clarity.
The model roughly goes below as:
inputs = Input(shape=(None,),dtype='float32')
<Embedding layer>
<Convolution layer>
linear_output = Dense(10,input_shape=(72,),activation='relu')(linear_input)
model = Model(inputs=[inputs],outputs=[linear_output])
model.compile(loss='categorical_crossentropy', optimizer='nadam')
Keras version - 2.2.4
tensorflow version: 1.5.0
Regards
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the model entry point shown in the issue, especially the Embedding layer input and the training data represented by ar_train_data. Reproduce the first-epoch failure and compare the value reaching the layer with the printed source value; done means identifying and documenting why an out-of-range index reaches the embedding.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, tensorflow
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100