1 write to Train
Microsoft.ML.Vision (1)
ImageClassificationTrainer.cs (1)
976
metrics.
Train
= new TrainMetrics();
40 references to Train
Microsoft.ML.TensorFlow.Tests (14)
TensorflowTests.cs (14)
1647
if (metric.
Train
!= null)
1650
if (metric.
Train
.DatasetUsed == ImageClassificationTrainer.ImageClassificationMetrics.Dataset.Train)
1653
crossEntropyTraining[metric.
Train
.Epoch] = metric.
Train
.CrossEntropy;
1655
if (metric.
Train
.Epoch > 0)
1656
Assert.True(crossEntropyTraining[metric.
Train
.Epoch - 1] > crossEntropyTraining[metric.
Train
.Epoch]);
1661
crossEntropyValidation[metric.
Train
.Epoch] = metric.
Train
.CrossEntropy;
1663
if (metric.
Train
.Epoch > 0)
1664
Assert.True(crossEntropyValidation[metric.
Train
.Epoch - 1] > crossEntropyValidation[metric.
Train
.Epoch]);
1803
MetricsCallback = (metric) => { Console.WriteLine(metric); lastEpoch = metric.
Train
!= null ? metric.
Train
.Epoch : 0; },
Microsoft.ML.Vision (26)
ImageClassificationTrainer.cs (26)
340
public override string ToString() =>
Train
!= null ?
Train
.ToString() : Bottleneck.ToString();
1016
metrics.
Train
.Accuracy += accuracy;
1017
metrics.
Train
.CrossEntropy += crossentropy;
1025
metrics.
Train
.Epoch = epoch;
1026
metrics.
Train
.Accuracy /= metrics.
Train
.BatchProcessedCount;
1027
metrics.
Train
.CrossEntropy /= metrics.
Train
.BatchProcessedCount;
1028
metrics.
Train
.DatasetUsed = ImageClassificationMetrics.Dataset.Train;
1045
metrics.
Train
.Accuracy += accuracy;
1046
metrics.
Train
.CrossEntropy += crossentropy;
1053
metrics.
Train
.Epoch = epoch;
1054
metrics.
Train
.Accuracy /= metrics.
Train
.BatchProcessedCount;
1055
metrics.
Train
.CrossEntropy /= metrics.
Train
.BatchProcessedCount;
1056
metrics.
Train
.DatasetUsed = ImageClassificationMetrics.Dataset.Validation;
1063
if (_options.EarlyStoppingCriteria.ShouldStop(metrics.
Train
))
1090
metrics.
Train
.Accuracy = 0;
1091
metrics.
Train
.CrossEntropy = 0;
1092
metrics.
Train
.BatchProcessedCount = 0;
1093
metrics.
Train
.LearningRate = learningRate;
1121
metrics.
Train
.LearningRate = learningRateScheduler.GetLearningRate(trainState);
1122
runner.AddInput(new Tensor(metrics.
Train
.LearningRate, TF_DataType.TF_FLOAT), 2);
1129
metrics.
Train
.BatchProcessedCount += 1;