Skip to content
Example of how use TensorBoard projector plugin to visualize embeddings
Python Dockerfile Makefile Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
images
scripts
src
.gitignore
Dockerfile First Commit Jan 9, 2020
LICENSE
Makefile
README.md Update README Jan 9, 2020
requirements.txt

README.md

Tensorboard Embedding Projection Example

How to make embeddings projection on TensorBoard

TensorBoard Projector

Install docker

Follow these steps

Install nvidia-container-toolkit or nvidia-docker2

Follow these steps

Install and run

The command below will build the docker image and run other installation steps

make install

Build docker image

This is already performed if you previously have run make install

docker build . -t mnist_projection

Enter container

docker run -it \
-v ${PWD}/projections:/projections/ \
-v ${PWD}/keras_datasets:/root/.keras/datasets \
-p 6006:6006 \
--rm --gpus all mnist_projection bash

Train model

python -m mnist_train \
    --output_dir /projections\
    --batch_size 16 \
    --epochs 5

Extract and Visualize Embeddings

python -m mnist_project_embeddings \
    --output_dir /projections/<timestamp>/ \
    --ckpt_path /projections/<timestamp>/model.hdf5 \
    --layer_name model_dense_1

Visualize embeddings

tensorboard --logdir /projections/<timestamp>/tensorboard/projector/ --port 6006

Enter localhost:6006 at your browser

You can’t perform that action at this time.