Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use different colors for different labels in TensorBoard embedding visualization?

Tags:

tensorboard

I am visualizing sentence embedding using tensorboard. I have label for each sentence embedding. How can I set a color for each label? For example

  embedding vector                        Labels
  [0.2342 0.2342 0.234 0.8453]             A
  [0.5342 0.9342 0.234 0.1453]             B
  [0.7342 0.0342 0.124 0.8453]             C
  [0.8342 0.5342 0.834 0.5453]             A

I am able to visualize the embedding vector where each row is labeled by its label. I want to set colors also so that I see points with same label will have same color. Like all "A" will be red, "B" will be green, "C" will be blue and so on?

I searched on Google but didn't get any sample. Could anyone please share some code to get it done?

Thank you in advanced.

like image 664
Mahbub Avatar asked Oct 15 '25 14:10

Mahbub


1 Answers

There should be a colour by drop down that you can use. In case that is not showing up, one of the possible reason could be that you have more than 50 unique labels, which is the hardcoded limit in the current tensorflow code.

Refer to this thread for details.

https://github.com/tensorflow/tensorboard/issues/61

like image 122
Vinay George Roy Avatar answered Oct 19 '25 14:10

Vinay George Roy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!