An index value of 70 for an embedding layer size of 70 won’t work, since the valid indices would be in the range [0, 69], so you would either need to increase the num_embeddings value or clip the input.