3
$\begingroup$

After the network train, the Training Progress Panel will disappear in MMA.But the panel always give a lot of information about the trained result. Such as this net

net = LinearLayer[];
trained = NetTrain[net, {1 -> 1.9, 2 -> 4.1, 3 -> 6.0, 4 -> 8.1}]

I hope the Training Progress Panel don't disapear after the training. Is possible?

$\endgroup$
6
  • 1
    $\begingroup$ I don't think it's possible to keep the panel, but you can store the data shown in the panel using something like TrainingProgressReporting -> ((t = <|KeyValueMap[# -> #2 &]@#|>) &) (this stores the data in t) and build a table yourself. (The explicit rebuilding is necessary to for the values of the association to evaluate) $\endgroup$
    – Lukas Lang
    Commented Sep 27, 2017 at 18:36
  • $\begingroup$ This will work too but won't help as values don't exist after the training is finished: Unprotect@PrintTemporary; Block[{PrintTemporary = Print}, trained = NetTrain[net, {1 -> 1.9, 2 -> 4.1, 3 -> 6.0, 4 -> 8.1}] ] Protect@PrintTemporary $\endgroup$
    – Kuba
    Commented Sep 29, 2017 at 10:07
  • $\begingroup$ @Kuba Almost man..Just little flaw...Could we take a picture for the panel after finish the train? $\endgroup$
    – yode
    Commented Sep 29, 2017 at 10:20
  • $\begingroup$ a lot of information? what information $\endgroup$
    – partida
    Commented Oct 10, 2017 at 11:35
  • $\begingroup$ @partida Such as it is overfit not not, such as the trained time, I mean those information in that panel~ $\endgroup$
    – yode
    Commented Oct 10, 2017 at 12:01

1 Answer 1

3
$\begingroup$

I give you some hint,then you can prettify it.

data = Flatten@
Table[{x, y} -> x*y, {x, -1, 1, .005}, {y, -1, 1, .005}];
epochs = 2;
batchSize = 1024;
batchsPerEpochs = Floor[Length[data]/batchSize];
net = NetChain[{32, Tanh, 1}];
{trained, info} = {First@#, Rest@#} &@
NetTrain[net, data, Automatic(*loss function*), 
        {"TrainedNet", "LossEvolutionPlot", "LastRoundLoss", 
         "LastValidationLoss", "MeanBatchesPerSecond", 
         "MeanInputsPerSecond", "TotalTrainingTime"}, 
         BatchSize -> batchSize, 
         MaxTrainingRounds -> Round[epochs*Length[data]*0.9/batchSize], 
         ValidationSet -> Scaled[0.1]];

enter image description here

Column[Join[{"BatchSize:" <> ToString@batchSize, 
             "rounds:" <> ToString@epochs, 
             Sequence @@ 
                Thread[{"LossEvolutionPlot", "LastRoundLoss", 
                        "LastValidationLoss", "MeanBatchesPerSecond", 
                        "MeanInputsPerSecond", "TotalTrainingTime"} -> info]}]]

enter image description here

All of the properties list here

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.