Code readability adjustments and missing constants#559
Merged
bamurtaugh merged 1 commit intodotnet:masterfrom Jul 18, 2019
SnakyBeaky:patch-1
Merged
Code readability adjustments and missing constants#559bamurtaugh merged 1 commit intodotnet:masterfrom SnakyBeaky:patch-1
bamurtaugh merged 1 commit intodotnet:masterfrom
SnakyBeaky:patch-1
Conversation
bamurtaugh
reviewed
Jul 17, 2019
| .Append(mlContext.Transforms.ExtractPixels(outputColumnName: "input", interleavePixelColors: ImageNetSettings.channelsLast, offsetImage: ImageNetSettings.mean)) | ||
| .Append(mlContext.Model.LoadTensorFlowModel(modelLocation) | ||
| .ScoreTensorFlowModel(outputColumnNames: new[] { "softmax2" }, inputColumnNames: new[] { "input" }, | ||
| addBatchDimensionInput:true)); |
Member
There was a problem hiding this comment.
Did you consider using the same indentation found in TFModelScorer.cs? (Lines 67-72 https://github.com/dotnet/machinelearning-samples/blob/master/samples/csharp/getting-started/DeepLearning_ImageClassification_TensorFlow/ImageClassification/ModelScorer/TFModelScorer.cs)
Contributor
Author
There was a problem hiding this comment.
I believe this indentation hides less code and is also more common throughout C# snippets, at least for the Append method calls.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Both adjustments are for readability, the missing code snippet is necessary as they are not defined anywhere else and are used in the pipeline creation. I've taken them from https://docs.microsoft.com/en-us/dotnet/machine-learning/tutorials/image-classification#create-a-struct-for-default-parameters since both articles are using the same inception model.