TensorBoard PR Curve

The tensorboard_pr_curve.py example demonstrates the integration of Trains into code which uses TensorFlow and TensorBoard. It creates three classes, R, G, and B, and generates colors within the RGB space from normal distributions. The true label of each random color is associated with the normal distribution that generated it. Using three other normal distributions, the example code computes the probability that each color belongs to the class. The example uses those probabilities to generate PR curves. Using tensorboard.plugins.pr_curve.summary, the example code create a summary per class. Trains automatically logs the TensorBoard output, as well as the TensorFlow DEFINES and output to the console. When the script runs, it creates an experiment named tensorboard pr_curve, which is associated with the examples project.


In the Trains Web (UI), the PR Curve summaries appears in the RESULTS tab, PLOTS sub-tab.

  • Blue PR curves
  • Green PR curves
  • Red PR curves


Command line arguments, which are automatically logged when argparse is used, appear in the HYPER PARAMETERS tab.


All other console output appears in the RESULTS tab, LOG tab.