简体   繁体   中英

How can I use the TensorFlow Embeddings Projector inside my own GCP VM or Jupterlab instance?

Is there a way of running the Embedding Projector inside my GCP Jupyterlab instance (or through any other GCP service) as opposed to using the public https://projector.tensorflow.org ?

The TensorFlow documentation mentions that Embeddings Projector can be run inside Tensorboard, but doesn't provide any links or details.

Unfortunately there is not an Google Cloud product available that brings those projector functionalities specifically but you can run the projector Tensorboard plugin in AI Notebooks (Jupyterlab) locally.

Here's the source Tensorboard's projector plugin repository and here's the step by step guide where the projector plugin has been used for that specific use case you mentioned. Bear in mind that this step by step guide is done on Tensorflow 1.1x not 2.0.0. If you want to use Tensorflow 2.0.0 you will need to import the plugin like this

from tensorboard.plugins import projector

and then migrate all the Tensorflow 1.1x code to >= 2.0 described in the guide in order to get the same log files as the guide. If you already have the neccesary files to make your custom projector you just need to select the plugin inside the Tensorboard UI.

Tensorboard Projector plugin selection

You can also make a web embedding into an IFrame if using the public Tensorboard tool (I understand that this is not your case but this might be helpful to other people searching for an alternative solution). Opening an AI Notebook and pasting the following code would do the job.

import IPython
url = 'https://projector.tensorflow.org/'

IPython.display.IFrame(url, width=1333, height=900)

Remember to change the width and height values if you need to.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM