Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embedding projector hangs in version 1.11.0 #1480

Closed
persiyanov opened this issue Oct 2, 2018 · 3 comments
Closed

Embedding projector hangs in version 1.11.0 #1480

persiyanov opened this issue Oct 2, 2018 · 3 comments

Comments

@persiyanov
Copy link

persiyanov commented Oct 2, 2018

TensorBoard embedding projector hangs on a title "Computing PCA....". I solved this problem when downgraded both TF & TensorBoard to version 1.7.0.

  • TensorBoard & TensorFlow version is 1.11.0
  • OS Platform and version Linux Ubuntu 16.04
  • Python version 3.5

The minimal example to reproduce the issue:

import os
import numpy as np
import tensorflow as tf
from tensorflow.contrib.tensorboard.plugins import projector

LOG_DIR = 'logs'
embeddings = np.array([[ 0.00403953, -0.00622064, -0.01170987,  0.02049868, -0.01784528,
        -0.00844114,  0.00360506, -0.09942514,  0.032083  , -0.0056223 ],
       [-0.04307625, -0.01297725,  0.03254195,  0.00583903, -0.00986445,
        -0.02183709,  0.01153475, -0.10950625, -0.03583045, -0.03795925],
       [-0.03899275, -0.0046966 ,  0.01469164,  0.01740974,  0.01288737,
        -0.0306037 ,  0.0353404 , -0.09731412,  0.04237695,  0.02322971],
       [-0.00181839,  0.00105444, -0.01013809,  0.04349392, -0.02176337,
        -0.04931752, -0.02105442, -0.07082064,  0.00941054, -0.02279854],
       [ 0.0296278 ,  0.0406456 , -0.01181266,  0.03085812, -0.0182738 ,
        -0.01673431,  0.0178362 , -0.1398714 ,  0.0270176 , -0.00516446],
       [-0.0595875 , -0.047008  ,  0.002867  ,  0.00726775, -0.002714  ,
        -0.029009  ,  0.002205  , -0.10231575, -0.0291282 ,  0.01943275],
       [-0.00291987, -0.069231  , -0.02141933, -0.01235343,  0.000823  ,
        -0.05252166, -0.000757  , -0.11705633,  0.0241631 ,  0.02844123],
       [ 0.0141408 , -0.02469571, -0.01984159, -0.00944844,  0.00886971,
        -0.0474157 , -0.01649545, -0.13802414, -0.02138517,  0.01678829],
       [ 0.008873  ,  0.05906433, -0.020482  , -0.01096687, -0.022655  ,
        -0.04205434,  0.02315167, -0.12080999, -0.029119  , -0.03175637],
       [ 0.028179  , -0.04476625, -0.017764  ,  0.02365533,  0.00857486,
        -0.0018825 ,  0.0024118 , -0.11940325,  0.0164014 , -0.00140572]],
      dtype=np.float32)

emb_var = tf.Variable(embeddings, name='embeddings')

with tf.Session() as sess:
    saver = tf.train.Saver([emb_var])

    sess.run(emb_var.initializer)
    saver.save(sess, os.path.join(LOG_DIR, 'emb.ckpt'))

    config = projector.ProjectorConfig()
    # One can add multiple embeddings.
    embedding = config.embeddings.add()
    embedding.tensor_name = emb_var.name
    # Saves a config file that TensorBoard will read during startup.
    projector.visualize_embeddings(tf.summary.FileWriter(LOG_DIR), config)
@stephanwlee
Copy link
Contributor

Thanks for the issue with the sample code! I was able to reproduce this and I have a fix ready 😃

@benelot
Copy link

benelot commented Jan 31, 2019

Just came across this problem while replicating some results in a project that had 1.11.0 in its requirements. I can confirm that the problem exists in version 1.11.0 only and is fixed after that in version 1.12.2.

@jvence
Copy link

jvence commented Feb 15, 2019

Yes I can confirm that this problem exists in 1.11.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants