Data Science, Machine Learning, NLP, Transformers, Word Embeddings.
signature="default", as_dict=True)["elmo"] Convert Tensorflow tensors to numpy array. %%time with tf.Session() as sess: sess.run(tf.global_variables_initializer()) sess.run(tf.tables_initializer()) x = sess.run(embeddings) embs = x.reshape(-1, 1024) masked_embs = embs[mask] Visualize embeddings