As @Ekaterina_Dranitsyna pointed out, your input values must be bounded within this range [0, 3). I’d suggest going through the documentation of the Embedding layer once to thoroughly understand what each of the arguments expects in terms of values:

  
      

      keras.io
  

  
    

Keras documentation: Embedding layer 19