NetTrainResultsObject

NetTrainResultsObject[]

represents an object generated by NetTrain that contains the trained net and other information about the training process.

Details

  • NetTrain[net,data,All] will generate a NetTrainResultsObject[].
  • NetTrainResultsObject[][prop] is used to look up property prop from the NetTrainResultsObject.
  • Properties supported include:
  • "TrainedNet"the optimal trained network found (default)
    "BatchesPerRound"the number of batches contained in a single round
    "BatchLossList"a list of the mean losses for each batch update
    "BatchMeasurementsLists"list of training measurements associations for each batch update
    "BatchSize"the effective value of BatchSize
    "BestValidationRound"the training round corresponding to the trained net
    "CheckpointingFiles"list of checkpointing files generated during training
    "ExamplesProcessed"total number of examples processed during training
    "FinalLearningRate"the learning rate at the end of training
    "FinalPlots"association of plots for all losses and measurements
    "InitialLearningRate"the learning rate at the start of training
    "LossPlot"a plot of the evolution of the mean training loss
    "MeanBatchesPerSecond"the mean number of batches processed per second
    "MeanExamplesPerSecond"the mean number of input examples processed per second
    "NetTrainInputForm"an expression representing the originating call to NetTrain
    "OptimizationMethod"the name of the optimization method used
    "ReasonTrainingStopped"brief description of why training stopped
    "RoundLoss"the mean loss for the most recent round
    "RoundLossList"a list of the mean losses for each round
    "RoundMeasurements"association of training measurements for the most recent round
    "RoundMeasurementsLists"list of training measurements associations for each round
    "RoundPositions"the batch numbers corresponding to each round measurement
    "TargetDevice"the device used for training
    "TotalBatches"the total number of batches encountered during training
    "TotalRounds"the total number of rounds of training performed
    "TotalTrainingTime"the total time spent training, in seconds
    "TrainingExamples"the number of examples in the training set
    "TrainingNet"the network as prepared for training
    "ValidationExamples"the number of examples in the validation set
    "ValidationLoss"the mean loss obtained on the ValidationSet for the most recent validation measurement
    "ValidationLossList"list of the mean losses on the ValidationSet for each validation measurement
    "ValidationMeasurements"association of training measurements on the ValidationSet after the most recent validation measurement
    "ValidationMeasurementsLists"list of training measurements associations on the ValidationSet for each validation measurement
    "ValidationPositions"the batch numbers corresponding to each validation measurement
    "WeightsLearningRateMultipliers"an association of the learning rate multiplier used for each weight

Examples

Basic Examples  (1)

Obtain a NetTrainResultsObject for a training session:

In[1]:=
Click for copyable input
Out[1]=

Query the results object for specific properties:

In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=
In[4]:=
Click for copyable input
Out[4]=
Out[4]=
In[5]:=
Click for copyable input
Out[5]=
In[6]:=
Click for copyable input
Out[6]=

Get a list of all available properties:

In[7]:=
Click for copyable input
Out[7]=
Introduced in 2018
(11.3)
|
Updated in 2019
(12.0)