-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fix for MulticlassNaiveBayesTrainer export to Onnx #4928
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
Lynx1820
commented
Mar 10, 2020
- Adding support for a batch input dimension
- While ML.NET doesn't use this batch dimension, ORT does.
...crosoft.ML.StandardTrainers/Standard/MulticlassClassification/MulticlassNaiveBayesTrainer.cs
Show resolved
Hide 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.
🕐
var opType = "Greater"; | ||
ctx.CreateNode(opType, new[] { featureColumn, zero }, new[] { greaterOutput }, ctx.GetNodeName(opType), ""); | ||
|
||
opType = "Cast"; | ||
var isFeaturePresent = ctx.AddIntermediateVariable(null, "isFeaturePresent", true); | ||
var node = ctx.CreateNode(opType, greaterOutput, isFeaturePresent, ctx.GetNodeName(opType), ""); | ||
var castOutput = ctx.AddIntermediateVariable(new VectorDataViewType(NumberDataViewType.Single, _featureHistogram[0].Length), "castOutput"); |
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.
new VectorDataViewType(NumberDataViewType.Single, _featureHistogram[0].Length) [](start = 57, length = 78)
There seem to be about two or three shapes involved here. Can you please create the shapes in one place at the top and reuse the shapes?
It would make the code more readable and make it easier to follow along?
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.