Embeddings are not shown in TensorBoard

I am not able to visualize the embeddings using the TensorBoard, but the other elements (graph, scalars, distribution, histograms…) are shown.

I am using the example from the RStudio page: mnist_cnn_embeddings.
There are 2 files generated in the embeddings directory: metadata.tsv and events.out.tfevents.*.
The embeddings are not shown and the embedding menu is missing from TensorBoard (screenshot).

Recently , I reinstalled the R 3.5.3 and Anaconda/python 3.7 on a win10 machine.
I tried to find a solution by web search, but I am stuck.
May I ask to provide some tips how to troubleshoot/solve this issue?

Thank you.

1 Like

I don't have an answer for you, but keep in mind that TensorBoard is not really connected to R or RStudio in any way, so you might have better luck finding the answer on a forum with more TensorFlow users.

1 Like

Thank you. It’s a totally valid answer, but on the other hand I have that 22 catch feeling. Going to any TensorFlow related forum I have to provide (reproducible) examples in Python. My current, personal decision was to stay with R and to not “migrate” to Python as the tensorflow/keras R packages provided a good opportunity for DL+R. Already I did extensive search on many different forums, but I haven’t find any topic which can help me.

Are there any (easy) steps to rule out if I done any misconfiguration when installing R/Python/TensorFlow/Keras?
Maybe sharing an example of a correct result (like a screenshot and listing of the “embeddings_dir”) can provide ideas to narrow down the search for a solution.

I ran the same example and I'm fairly certain there is a problem with the package itself, not with your setup.

I'm following the comment in the file:

# Launch TensorBoard
# As the model is being fit you will be able to view the embedings in the 
# Projector tab. On the left, use "color by label" to see the digits displayed
# in 10 different colors. Hover over a point to see its label.

and there is nothing in "Projector" tab:

No checkpoint was found.

Probable causes:

    No checkpoint has been saved yet. Please refresh the page periodically.
    You are not saving any checkpoint. To save your model, create a tf.train.Saver and save your model periodically by calling saver.save(session, LOG_DIR/model.ckpt, step). 

If you’re new to using TensorBoard, and want to find out how to add data and set up your event files, check out the README and perhaps the TensorBoard tutorial.

If you think TensorBoard is configured properly, please see the section of the README devoted to missing data problems and consider filing an issue on GitHub. 

So I would suggest to wait for a little while to see if there is someone more knowledgeable about how it's supposed to work. But you might also consider filing an issue on github about it after couple of days.

Embeddings projector seems to work only with the keras implementation.

In tf 1.12.0 they seemed to ignore embeddings parameters, in tf.1.13.1 there was a bug (https://github.com/tensorflow/tensorboard/issues/1666), in tf 1.14 (nightly) it seems to be ignored again.

You may want to try with the keras implementation:


Thank you. It’s working by specifying the keras implementation.

It’s a bit strange that this line is required because according to the documentation the default is keras.
implementation One of "keras" or "tensorflow" (defaults to "keras").

Just I am comparing the results and theTensorBoard renderings using these two implementations.
Is there any good summary document comparing the differences between these two implementations (other than comparing the tensorflow and keras documents for every involved layer separately)?

For some time now we are using tensorflow as the default implementation. I'll fix the docs!

I am not aware of a document comparing both implementations. In theory they are equivalent and the TF implementation has additional features to improve TensorFlow compatibility.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.