Node: 'sequential/embedding/embedding_lookup' indices[0,57] = 1544453 is not in [0, 1498136) 	 [[{{node sequential/embedding/embedding_lookup}}]] [Op:__inference_train_function_8141]
@priyansh4320 
 I tried to reproduce the issue on colab using TF v2.11 but facing different error could you please provide all dependencies and find the gist [here](https://colab.research.google.com/gist/tiruk007/b861319a02bcbea01a7a2a80154f906b/untitled134.ipynb) for reference.

Thank you ! @tiruk007 i assume that you have also uploaded the dataset via the link https://drive.google.com/file/d/1pKAJ-PF42nRB2kw0ZdMAkg1i2fUSvF-y/view?usp=sharing  to your google drive.

1. my file path to the dataset is this : /content/drive/MyDrive/ATS- gigadata/model_gigadata_new.csv 
2. here I have create another folder  "ATS-gigadata" where my file is located
3. you can use this path for yourself: /content/drive/MyDrive/model_gigadata_new.csv
4. since uploading a file to google drive will appear in "MyDrive" by default
5. regarding dependencies , all dependencies are provided in file itself   This issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Thank you.
 @priyansh4320 
Sorry for the late reply, Could you please provide an accessible dataset to replicate the issue reported here ?

Thank you!
 @tiruk007  
dataset link : https://drive.google.com/file/d/1pKAJ-PF42nRB2kw0ZdMAkg1i2fUSvF-y/view?usp=sharing @SuryanarayanaY 
I was able to reproduce the issue on Colab using 2.11. please find the gist [here](https://colab.research.google.com/gist/tiruk007/98ddf5d0ede5ad6f6ad06168ed1e09f5/untitled148.ipynb) for reference.

Thank you ! @tiruk007  ok, now can you please provide me solution to resolve this error . i am not able to move forward in my project.
 Hi, Apologies for the delayed response, I tried to check the issue. Model definition looks fine, the only thing you want to try is data preprocessing part like take a relook into the tokenizer part.
Also, I did not get the use of below logic.
```
#increasing length of word index to change the shape
i=1
while i<=10:
  word_index['person organization gpe ',i] = 1000+i
  i+=1
```

 This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you. This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further. Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/59709">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/59709">No</a>

<details><summary>Click to expand!</summary> 
 
 ### Issue Type

Bug

### Have you reproduced the bug with TF nightly?

Yes

### Source

source

### Tensorflow Version

tensorflow.compat.v2.version

### Custom Code

Yes

### OS Platform and Distribution

google colab

### Mobile device

_No response_

### Python version

_No response_

### Bazel version

_No response_

### GCC/Compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current Behaviour?

```shell
InvalidArgumentError: Graph execution error:

Detected at node 'sequential/embedding/embedding_lookup' defined at (most recent call last):
    File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
      return _run_code(code, main_globals, None,
    File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
      exec(code, run_globals)
    File "/usr/local/lib/python3.8/dist-packages/ipykernel_launcher.py", line 16, in <module>
      app.launch_new_instance()
    File "/usr/local/lib/python3.8/dist-packages/traitlets/config/application.py", line 992, in launch_instance
      app.start()
    File "/usr/local/lib/python3.8/dist-packages/ipykernel/kernelapp.py", line 612, in start
      self.io_loop.start()
    File "/usr/local/lib/python3.8/dist-packages/tornado/platform/asyncio.py", line 149, in start
      self.asyncio_loop.run_forever()
    File "/usr/lib/python3.8/asyncio/base_events.py", line 570, in run_forever
      self._run_once()
    File "/usr/lib/python3.8/asyncio/base_events.py", line 1859, in _run_once
      handle._run()
    File "/usr/lib/python3.8/asyncio/events.py", line 81, in _run
      self._context.run(self._callback, *self._args)
    File "/usr/local/lib/python3.8/dist-packages/tornado/ioloop.py", line 690, in <lambda>
      lambda f: self._run_callback(functools.partial(callback, future))
    File "/usr/local/lib/python3.8/dist-packages/tornado/ioloop.py", line 743, in _run_callback
      ret = callback()
    File "/usr/local/lib/python3.8/dist-packages/tornado/gen.py", line 787, in inner
      self.run()
    File "/usr/local/lib/python3.8/dist-packages/tornado/gen.py", line 748, in run
      yielded = self.gen.send(value)
    File "/usr/local/lib/python3.8/dist-packages/ipykernel/kernelbase.py", line 365, in process_one
      yield gen.maybe_future(dispatch(*args))
    File "/usr/local/lib/python3.8/dist-packages/tornado/gen.py", line 209, in wrapper
      yielded = next(result)
    File "/usr/local/lib/python3.8/dist-packages/ipykernel/kernelbase.py", line 268, in dispatch_shell
      yield gen.maybe_future(handler(stream, idents, msg))
    File "/usr/local/lib/python3.8/dist-packages/tornado/gen.py", line 209, in wrapper
      yielded = next(result)
    File "/usr/local/lib/python3.8/dist-packages/ipykernel/kernelbase.py", line 543, in execute_request
      self.do_execute(
    File "/usr/local/lib/python3.8/dist-packages/tornado/gen.py", line 209, in wrapper
      yielded = next(result)
    File "/usr/local/lib/python3.8/dist-packages/ipykernel/ipkernel.py", line 306, in do_execute
      res = shell.run_cell(code, store_history=store_history, silent=silent)
    File "/usr/local/lib/python3.8/dist-packages/ipykernel/zmqshell.py", line 536, in run_cell
      return super(ZMQInteractiveShell, self).run_cell(*args, **kwargs)
    File "/usr/local/lib/python3.8/dist-packages/IPython/core/interactiveshell.py", line 2854, in run_cell
      result = self._run_cell(
    File "/usr/local/lib/python3.8/dist-packages/IPython/core/interactiveshell.py", line 2881, in _run_cell
      return runner(coro)
    File "/usr/local/lib/python3.8/dist-packages/IPython/core/async_helpers.py", line 68, in _pseudo_sync_runner
      coro.send(None)
    File "/usr/local/lib/python3.8/dist-packages/IPython/core/interactiveshell.py", line 3057, in run_cell_async
      has_raised = await self.run_ast_nodes(code_ast.body, cell_name,
    File "/usr/local/lib/python3.8/dist-packages/IPython/core/interactiveshell.py", line 3249, in run_ast_nodes
      if (await self.run_code(code, result,  async_=asy)):
    File "/usr/local/lib/python3.8/dist-packages/IPython/core/interactiveshell.py", line 3326, in run_code
      exec(code_obj, self.user_global_ns, self.user_ns)
    File "<ipython-input-32-2dfe1a9e3af4>", line 1, in <module>
      model.fit(padded_sequences_x, padded_sequences_y, batch_size=64, epochs=15)
    File "/usr/local/lib/python3.8/dist-packages/keras/utils/traceback_utils.py", line 65, in error_handler
      return fn(*args, **kwargs)
    File "/usr/local/lib/python3.8/dist-packages/keras/engine/training.py", line 1650, in fit
      tmp_logs = self.train_function(iterator)
    File "/usr/local/lib/python3.8/dist-packages/keras/engine/training.py", line 1249, in train_function
      return step_function(self, iterator)
    File "/usr/local/lib/python3.8/dist-packages/keras/engine/training.py", line 1233, in step_function
      outputs = model.distribute_strategy.run(run_step, args=(data,))
    File "/usr/local/lib/python3.8/dist-packages/keras/engine/training.py", line 1222, in run_step
      outputs = model.train_step(data)
    File "/usr/local/lib/python3.8/dist-packages/keras/engine/training.py", line 1023, in train_step
      y_pred = self(x, training=True)
    File "/usr/local/lib/python3.8/dist-packages/keras/utils/traceback_utils.py", line 65, in error_handler
      return fn(*args, **kwargs)
    File "/usr/local/lib/python3.8/dist-packages/keras/engine/training.py", line 561, in __call__
      return super().__call__(*args, **kwargs)
    File "/usr/local/lib/python3.8/dist-packages/keras/utils/traceback_utils.py", line 65, in error_handler
      return fn(*args, **kwargs)
    File "/usr/local/lib/python3.8/dist-packages/keras/engine/base_layer.py", line 1132, in __call__
      outputs = call_fn(inputs, *args, **kwargs)
    File "/usr/local/lib/python3.8/dist-packages/keras/utils/traceback_utils.py", line 96, in error_handler
      return fn(*args, **kwargs)
    File "/usr/local/lib/python3.8/dist-packages/keras/engine/sequential.py", line 413, in call
      return super().call(inputs, training=training, mask=mask)
    File "/usr/local/lib/python3.8/dist-packages/keras/engine/functional.py", line 511, in call
      return self._run_internal_graph(inputs, training=training, mask=mask)
    File "/usr/local/lib/python3.8/dist-packages/keras/engine/functional.py", line 668, in _run_internal_graph
      outputs = node.layer(*args, **kwargs)
    File "/usr/local/lib/python3.8/dist-packages/keras/utils/traceback_utils.py", line 65, in error_handler
      return fn(*args, **kwargs)
    File "/usr/local/lib/python3.8/dist-packages/keras/engine/base_layer.py", line 1132, in __call__
      outputs = call_fn(inputs, *args, **kwargs)
    File "/usr/local/lib/python3.8/dist-packages/keras/utils/traceback_utils.py", line 96, in error_handler
      return fn(*args, **kwargs)
    File "/usr/local/lib/python3.8/dist-packages/keras/layers/core/embedding.py", line 208, in call
      out = tf.nn.embedding_lookup(self.embeddings, inputs)
Node: 'sequential/embedding/embedding_lookup'
indices[0,57] = 1544453 is not in [0, 1498136)
	 [[{{node sequential/embedding/embedding_lookup}}]] [Op:__inference_train_function_8141]

```


### Standalone code to reproduce the issue

```shell
link to code and dataset:
colab file: https://colab.research.google.com/drive/13JZX5HQQGJrf6t9CcCA0kM3JHegBtnTz?usp=sharing   dataset: 
 https://drive.google.com/file/d/1pKAJ-PF42nRB2kw0ZdMAkg1i2fUSvF-y/view?usp=sharing



i expect the code to fit in the model:
model:
# Define  model
model = Sequential()
model.add(Embedding(len(word_index)+1 ,
                    embedding_weights.shape[1],
                    weights=[embedding_weights],
                    input_length=padded_sequences_x.shape[1],
                    trainable=False))
model.add(Bidirectional(LSTM(32, return_sequences=True)))
model.add(attention(return_sequences=False)) # receive 3D and output 3D
model.add(RepeatVector(len(padded_sequences_y[1]))) # repeat vector
model.add(LSTM(32, return_sequences=True))  #decoder layer
model.add(Dropout(0.2))
model.add(TimeDistributed(Dense(1, activation='softmax')))
#model.add(Dense(1, activation='softmax'))


summery:
Model: "sequential"
_________________________________________________________________
 Layer (type)                Output Shape              Param #   
=================================================================
 embedding (Embedding)       (None, 79, 100)           149813600 
                                                                 
 bidirectional (Bidirectiona  (None, 79, 64)           34048     
 l)                                                              
                                                                 
 attention (attention)       (None, 64)                143       
                                                                 
 repeat_vector (RepeatVector  (None, 38, 64)           0         
 )                                                               
                                                                 
 lstm_1 (LSTM)               (None, 38, 32)            12416     
                                                                 
 dropout (Dropout)           (None, 38, 32)            0         
                                                                 
 time_distributed (TimeDistr  (None, 38, 1)            33        
 ibuted)
```


### Relevant log output

_No response_</details>