How can I add multiple Metadata in Torch Tensorboard Embedding?
I am using torch==1.9.0 and tensorboard==2.5.0. I would like to track data with tensorbaord as an embedding, so I am something like this:
data = np.random.poisson(lam=10.0, size=(4,4))
labels = [&quot;A&quot;,&quot;A&quot;,&quot;B&quot;,&quot;B&quot;]
ids = [1,2,3,4]
writer = SummaryWriter(&quot;/runs/&quot;)
writer.add_embedding(data,
                    metadata=labels)
writer.close()

But I only can add lables or ids as metadeta and not a combined dictionaty {'ids':ids, 'lables':labels}. Any idea, how to solve this? Thanks!
FYI: Tensorboard docs just descirbes metadata as a list:
https://pytorch.org/docs/stable/tensorboard.html

Found the answer. You could get multiple field by adding a metadata header and give metadat as list of lists:
writer.add_embedding(data.values,
                    metadata=metadata,
                    metadata_header=[&quot;Name&quot;,&quot;Labels&quot;])

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