주요 콘텐츠

exportPlotAsImage

Write training progress monitor to image file

Since R2026a

    Description

    exportPlotAsImage(monitor,filename) saves the training progress monitor monitor as an image. You can do this even when the Visible property of monitor is set to "off".

    example

    exportPlotAsImage(info,filename) creates an image of the training progress monitor from the information contained in the TrainingInfo object info, then saves the image as a file.

    Examples

    collapse all

    Create an empty training progress monitor using the trainingProgressMonitor function. Specify names for the information and metric values.

    monitor = trainingProgressMonitor;
    monitor.Info = ["LearningRate","Epoch","Iteration"];
    monitor.Metrics = "TrainingLoss";

    Save the training progress monitor as a PNG (*.png) file using the exportPlotAsImage function.

    exportPlotAsImage(monitor,"myTrainingProgressMonitor.png")

    Alternatively, you can save the training progress monitor by clicking Export as Image in the training window.

    Input Arguments

    collapse all

    Training progress monitor, specified as a TrainingProgressMonitor object.

    Neural network training information, specified as a TrainingInfo object.

    Name of the output file, specified as a string scalar or character vector. You can save the plot as a PNG (*.png), JPG (*.jpg), TIFF (*.tif), or PDF (*.pdf) file.

    Example: "myTrainingProgressMonitor.png"

    Version History

    Introduced in R2026a