Skip to content

ciandt-d1/tensorboard_projector_example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Example of how use TensorBoard projector plugin to visualize embeddings

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published