indices do not match while training Sequential model

I followed all the code as I found on this site:

But getting an error at this line:, y_train, epochs=10, batch_size=32)

InvalidArgumentError:  indices[12,78] = 4291 is not in [0, 4000)
     [[node embedding_1/embedding_lookup (defined at /opt/conda/lib/python3.7/site-packages/tensorflow_core/python/framework/ ]] [Op:__inference_keras_scratch_graph_1942]

Function call stack:

The full code is available here:

Leave a Reply

Your email address will not be published. Required fields are marked *