Skip to content

Instantly share code, notes, and snippets.

View tomasn4a's full-sized avatar
🌸

Tomas Rojo tomasn4a

🌸
  • Nonagon Data
  • Madrid, Spain
View GitHub Profile
@lampts
lampts / gensim2projector_tf.py
Last active December 7, 2020 22:37
how to convert/port gensim word2vec to tensorflow projector board.
# required tensorflow 0.12
# required gensim 0.13.3+ for new api model.wv.index2word or just use model.index2word
from gensim.models import Word2Vec
import tensorflow as tf
from tensorflow.contrib.tensorboard.plugins import projector
# loading your gensim
model = Word2Vec.load("YOUR-MODEL")