Skip to content

Instantly share code, notes, and snippets.

View a2tm7a's full-sized avatar

Amit Manchanda a2tm7a

  • Newton School
  • Bengaluru, India
View GitHub Profile
@a2tm7a
a2tm7a / gensim2projector_tf.py
Last active June 5, 2017 14:45 — forked from lampts/gensim2projector_tf.py
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
import numpy as np
# loading your gensim
model = Word2Vec.load("YOUR-MODEL")