Skip to content

Code readability adjustments and missing constants#559

Merged
bamurtaugh merged 1 commit intodotnet:masterfrom
SnakyBeaky:patch-1
Jul 18, 2019
Merged

Code readability adjustments and missing constants#559
bamurtaugh merged 1 commit intodotnet:masterfrom
SnakyBeaky:patch-1

Conversation

@SnakyBeaky
Copy link
Copy Markdown
Contributor

  • Adjusted indentation in model snippet
  • Adjusted chained method call indentation in pipeline definition snippet
  • Added missing code snippet with constants used in pipeline definition

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.

.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));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this indentation hides less code and is also more common throughout C# snippets, at least for the Append method calls.

@bamurtaugh bamurtaugh merged commit fa9f2aa into dotnet:master Jul 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants