-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Image Classification Sample cleanup #4380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4380 +/- ##
===========================================
- Coverage 90.11% 74.7% -15.41%
===========================================
Files 200 906 +706
Lines 36848 159288 +122440
Branches 1910 17145 +15235
===========================================
+ Hits 33206 119002 +85796
- Misses 3337 35476 +32139
- Partials 305 4810 +4505
|
d08871c
to
3f529c8
Compare
string imagesDownloadFolderPath = Path.Combine(assetsPath, "inputs", | ||
"images"); | ||
|
||
// Download Cifar Dataset. | ||
// Download Cifar Dataset and set train and test dataset | ||
// paths |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
period #Resolved
// Cross-Entropy: 0.03978536 | ||
// Phase: Training, Dataset used: Validation, Batch Processed Count: 3, | ||
// Epoch: 19, Accuracy: 0.852381 | ||
// We see that the training stops when the metric stops improving. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @[email protected] ! In this case where limiting the output to 85 characters actually makes it difficult to read sample output it is ok to cross 85 character. Otherwise your change looks very good, please fix similar stuff else where. #Resolved
// Learning Rate: 0.01 Epoch: 49, Accuracy: 1, | ||
// Cross-Entropy: 0.01758162 | ||
// Phase: Training, Dataset used: Validation, Batch Processed Count: 3, | ||
// Epoch: 49, Accuracy: 0.8666666 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please fix #Resolved
// Phase: Training, Dataset used: Train, Batch Processed Count: 18, | ||
// Learning Rate: 0.01 Epoch: 0, Accuracy: 0.9166667, | ||
// Cross-Entropy: 0.4866541 | ||
// ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please fix #Resolved
25c17f6
to
7a2c421
Compare
e90f6ba
to
3f94d39
Compare
3f94d39
to
80d557b
Compare
"pre-trained model/architecture ***"); | ||
|
||
// Measuring training time. | ||
var watch = System.Diagnostics.Stopwatch.StartNew(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var watch = System.Diagnostics.Stopwatch.StartNew(); [](start = 12, length = 52)
remove measuring time in samples #Resolved
// the same transforms as above. | ||
IEnumerable<ImageData> test_images = LoadImagesFromDirectory( | ||
folder: fullImagesetFolderPathTest, useFolderNameAsLabel: true); | ||
IDataView testDataset = mlContext.Data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IDataView testDataset = mlContext.Data. [](start = 12, length = 39)
new line #Resolved
folder: fullImagesetFolderPathTest, useFolderNameAsLabel: true); | ||
IDataView testDataset = mlContext.Data. | ||
LoadFromEnumerable(test_images); | ||
testDataset = mlContext.Transforms.Conversion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
testDataset = mlContext.Transforms.Conversion [](start = 12, length = 45)
newline #Resolved
@@ -119,37 +127,43 @@ private static void MlContext_Log(object sender, LoggingEventArgs e) | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add output from here to comments #Resolved
LearningRate = 0.01f, | ||
MetricsCallback = (metrics) => Console.WriteLine(metrics), | ||
ValidationSet = testDataset | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
null out ES #Resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove duplicate lines from project file. (dotnet#4439) Image Classification Sample cleanup (dotnet#4380) * Aligned line ending to 85 char limit * Cleaned up Early Stopping sample * Added comments to ResnetV2101TransferLearningTrainTestSplit * Added comments to ResnetV2101TransferLearningEarlyStopping * Add comments to ImageClassificationDefault sample * Added comments to LearningRateSchedulingCifarResnetTransferLearning sample * added '.', formatted output. * fixed sample after rebase * fix ealy stopping sample * fix GetAbsolutePath function for samples. * remove unnecessary try catch block from samples. * review comments. Increment stable API version and add new stable packages to the list. (dotnet#4453) * Increment stable API version and add new stable packages to the list. * Increment stable API version and add new stable packages to the list. also update template file format template file fix error in template fix condition in template file fix template format error fix template parameter error fix on template, seems corrupted when copy from github fix placeholder fix template error, encoding fix template fix in template file set system env take comments and make adjustment
Make samples more readable and add comments.