tensorflow emb
import tensorflow as tf import numpy as np model = tf.keras.Sequential() model.add(tf.keras.layers.Embedding(10, 1, input_length=5)) input_array = np.random.randint(10, size=(2, 5)) print(input_array) model.compile('rmsprop', 'mse') output_array = model.predict(input_array) print(output_array)