PyTorch with Matplotlib

The pytorch_matplotlib.py example demonstrates the integration of Trains into code which uses PyTorch and Matplotlib. The example script calls Matplotlib methods to show images, each with a different title. Trains automatically logs the images as debug samples. When the script runs, it creates an experiment named pytorch with matplotlib example which is associated with the examples project.

The images shown in the example script's imshow function appear in RESULTS tab, DEBUG SAMPLES sub-tab, where Metric indicates the title.

  • Input image
    imshow(input_img, title='Input Image')
  • Style image
    imshow(style_img, title='Style Image')
  • Content image
    imshow(content_img, title='Content Image')
  • Output image
    imshow(output, title='Output Image')

You can use the Trains Web (UI) debug sample image viewer to see detailed information about the image.