Skip to content

Initial commit. Tensorboard running with embeddings to utilise t-SNE

License

Notifications You must be signed in to change notification settings

woozoo73/mnist-tensorboard-embeddings

 
 

Repository files navigation

mnist-tensorboard-embeddings

Build Status

TensorBoard is a suite of web applications for inspecting and understanding your TensorFlow runs and graphs. The TensorFlow documentation isn't extremely explicit with the how-to visualizations. The code within mnist_t-sne.py is a working example of how to implement a 3-dimensional visualization with the MNIST dataset and it's embedded images.

The full tutorial is on the TensorFlow website.

By default, the Embedding Projector performs 3-dimensional principal component analysis, meaning it takes high-dimensional data and tries to find a structure-preserving projection onto three dimensional space. Basically, it does this by rotating the data so that the first three dimensions reveal as much of the variance in the data as possible. There's a nice visual explanation here. Another extremely useful projection is t-SNE.

Requirements

Sample output

Run the mnist_t-sne.py file from within its directory to generate the embeddings and visualisation.

Once you have event files, run TensorBoard and provide the log directory. If you're using a precompiled TensorFlow package (e.g. you installed via pip), run:

tensorboard --logdir=path/to/logs

This should print that TensorBoard has started. Next, connect to http://localhost:6006.

TensorBoard requires a logdir to read logs from. For info on configuring TensorBoard, run tensorboard --help.

TensorBoard can be used in Google Chrome or Firefox. Other browsers might work, but there may be bugs or performance issues.

The second file, mnist_with_summaries.py, is a full example of the embedding,visualization and a subsequent model generation. This second file mostly mirrors the official TensorFlow tutorial file.

Contribution

Your comments (issues) and PRs are always welcome.

About

Initial commit. Tensorboard running with embeddings to utilise t-SNE

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%