TrainingProgressReporting

TrainingProgressReporting

is an option for NetTrain and related functions that specifies how to report the progress of training.

Details

  • The following settings for TrainingProgressReporting can be used:
  • "Panel"show a dynamically updating graphical panel
    "Print"periodically report information using Print
    "ProgressIndicator"show a simple ProgressIndicator
    Function[]display a custom dynamically updated result
    File[]write the report to a file
    Nonedo not report any information
  • TrainingProgressReporting{spec1,spec2,} specifies multiple ways to report the progress.
  • The default setting of TrainingProgressReportingAutomatic will use "Panel" when a local notebook front end is evaluable; otherwise, it will use "Print".
  • Setting TrainingProgressReporting{form,"Interval"n} will report progress every n seconds.
  • Setting TrainingProgressReporting{form,"Interval"Quantity[n,"unit"]} specifies the interval at which to report progress. Possible forms of "unit" include:
  • "Rounds"net training rounds
    "Batches"training data batches
    "Seconds","Minutes","Hours"absolute time
  • The default interval depends on the form of reporting:
  • "Panel"Quantity[0.33,"Seconds"]
    "Print"Quantity[2,"Seconds"]
    "ProgressIndicator"Quantity[0.1,"Seconds"]
    Function[]Quantity[1,"Round"]
    File[]Quantity[1,"Round"]
  • Setting TrainingProgressReporting{form,,"MinimumInterval"n} specifies that progress should not be reported more frequently than once every n seconds.
  • The default minimum interval for TrainingProgressReportingFunction[] is 0.05 seconds. For all other reporting types, there is no minimum interval.
  • The pure function in TrainingProgressReportingFunction[] will be supplied with the association described in TrainingProgressFunction.
  • The following file extensions are supported for TrainingProgressReportingFile[]:
  • "CSV"comma-separated values
    "TSV"tab-separated values
    "JSON"JavaScript object notation
    "WL"Wolfram Language representation
  • For TrainingProgressReporting"Print" and TrainingProgressReportingFile[], some measurements specified via TrainingProgressMeasurements may be reported in aggregated form or not reported at all. For class-based measurements like "Precision", "Recall", "F1Score", etc., the macro-average is reported. For nonscalar NetPort[] measurements, the scalar mean is reported. For "ROCCurve" and "ConfusionMatrix", no value is reported.

Examples

open allclose all

Basic Examples  (6)

Show training progress interactively during training:

Print training progress periodically during training:

Show a simple progress indicator:

Perform custom reporting:

Write training progress information to a file:

Do not report progress:

Options  (1)

Print training progress periodically with an interval of 3 seconds:

Print training progress periodically with an interval of 100 batches and a minimum interval of 10 seconds:

Properties & Relations  (1)

Requested TrainingProgressMeasurements will be reported for the "Panel", "Print" and File[] reporting types:

Neat Examples  (1)

Monitor the solution while training a net to solve a least-squares problem. First generate training data:

Create a network to fit the data:

Replace the default progress panel with a dynamically updated plot of the current behavior of the net:

Plot the final net after 10 seconds of training:

Introduced in 2017
 (11.1)
 |
Updated in 2020
 (12.1)