ampligraph.utils.create_tensorboard_visualizations(model, loc, labels=None)

Create Tensorboard visualization files.

Note: this will create all the files required by Tensorboard to visualize embeddings, but you must run Tensorboard yourself.


>>> from ampligraph.utils import create_tensorboard_visualizations, restore_model
>>> import numpy as np
>>> example_name = 'helloworld.pkl'
>>> restored_model = restore_model(model_name_path = example_name)
>>> output_path = 'model_tensorboard/'
>>> create_tensorboard_visualizations(restored_model, output_path)
  • model (EmbeddingModel) – A trained neural knowledge graph embedding model, the model must be an instance of TransE, DistMult, ComplEx, or HolE.
  • loc (string) – Directory where the files are written.
  • labels (pd.DataFrame) – Label(s) for each embedding point in the Tensorboard visualization. Default behaviour is to use the embeddings labels included in the model.