TensorBoardX

The pytorch_tensorboardX.py example demonstrates the integration of Trains into code which uses PyTorch and TensorBoardX. It trains a simple deep neural network on the PyTorch built-in MNIST dataset. It creates a TensorBoardX SummaryWriter object to log scalars during training, scalars and debug samples during testing, and a test text message to the console (a test message to demonstrate Trains). When the script runs, it creates an experiment named pytorch with tensorboardX which is associated with the examples project in the Trains Web (UI).

Scalars

The loss and accuracy metric scalar plots appear in the RESULTS tab, SCALARS tab, along with the resource utilization plots, which are titled :monitor: machine.

Hyperparameters

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

Log

Text printed to the console for training progress, as well as all other console output, appear in the RESULTS tab, LOG tab.

Artifacts

Trains tracks the input and output model with the experiment, but the Trains Web (UI) shows the model details separately.

Input model

In the experiment details, ARTIFACTS tab, Input Model area, you can see Trains logging of the model name, and experiment creating the model.

In the model details (which appear when you click the model name, expand image above), you can see the following:

  • Input model location (URL)
  • Model snapshots / checkpoint model locations (URLs)
  • Experiment creating the model
  • Other general information about the model.

These appear in the model details GENERAL tab.

Output model

Trains logs the output model, providing the model name and output model configuration in ARTIFACTS tab, Output Model area.

In the model details (which appear when you click the model name, expand image above), you can see the following:

  • Input model location (URL).
  • Model snapshots / checkpoint model locations (URLs).
  • Experiment creating the model.
  • Other general information about the model.

These appear in the model details GENERAL tab.