question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Embedding visualization with eager execution

See original GitHub issue

TensorBoard version: 1.10.0 OS: Linux Ubuntu 16.04.5 LTS Python version: 2.7.12

I am using eager execution and I would like to visualize embeddings in TensorBoard. I use the following code to set up the visualization:

import tensorflow as tf import tensorflow.contrib.eager as tfe from tensorflow.contrib.tensorboard.plugins import projector tf.enable_eager_execution() tf.executing_eagerly() self._writer = tf.contrib.summary.create_file_writer('path') embedding_config = projector.ProjectorConfig() embedding = embedding_config.embeddings.add() embedding.tensor_name = self._word_embeddings.name embedding.metadata_path = 'metadata.tsv' projector.visualize_embeddings(self._writer, embedding_config)

where self._word_embeddings is my variable for the embeddings. However, when executing this script the following error is thrown:

File "/lib/python2.7/site-packages/tensorflow/contrib/tensorboard/plugins/projector/__init__.py", line 52, in visualize_embeddings logdir = summary_writer.get_logdir() AttributeError: 'SummaryWriter' object has no attribute 'get_logdir'

Might this be a bug? Any kind of help is greatly appreciated!

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
mmvcommented, Jun 14, 2019

This issue is more relevant now because TF2.0 removes SummaryWriter, making the projector impossible to use without a workaround.

0reactions
lanpacommented, Nov 25, 2018

@maximilianmozes Can you access the embedded vectors as a numpy array? If so, I think tensorboardX might do the trick.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Embedding visualization with TensorFlow eager execution
I am using TensorFlow's eager execution and I would like to visualize embeddings in TensorBoard. I use the following code to setup the ......
Read more >
Visualizing Data using the Embedding Projector in TensorBoard
For this tutorial, we will be using TensorBoard to visualize an embedding layer generated for classifying movie review data.
Read more >
Eager Execution vs. Graph Execution in TensorFlow: Which is ...
Eager execution is a powerful execution environment that evaluates operations immediately. It does not build graphs, and the operations return ...
Read more >
TensorFlow Eager: A multi-stage, Python-embedded DSL for ...
TensorFlow Eager thus offers a multi-stage programming model that makes it easy to interpolate between imperative and staged execution in a ...
Read more >
Deep Dive Into TensorBoard: Tutorial With Examples
The Best Tools for Machine Learning Model Visualization ... Execution Timeline section shows the history of the eager execution of operations and graphs....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found