-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[CoreML EP] Add support of BatchNormalization/Reshape/Global[Average/Max]Pool #6625
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
|
/azp run Windows CPU CI Pipeline |
|
Azure Pipelines successfully started running 1 pipeline(s). |
onnxruntime/core/providers/coreml/builders/impl/batch_norm_op_builder.cc
Outdated
Show resolved
Hide resolved
| << input_size << "d shape"; | ||
| return false; | ||
| } | ||
|
|
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.
Can we infer the batch size to be 1 and treat it as 4d if input_size == 3? #Pending
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.
This will be handled in a future PR, will need to add 1 to the end of the shape and make this a 2d batch norm, such as {N,C,H} -> {N,C,H,1}
Will need to add a ExpandDimsLayer (unsqueeze) before bn and a SqueezeLayer after
This may also be required by other ops since CoreML has weird shape for some layers
Updated comments
In reply to: 573438207 [](ancestors = 573438207)
|
|
||
| // Reshape opset 4- uses attributes for new shape which we do not support for now | ||
| int GetMinSupportedOpSet(const Node& /* node */) const override { return 5; } | ||
| }; |
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.
FWIW opset 7 was the first opset ORT ever supported so anything prior to that is irrelevant
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.
There are some op is the same since opset 1, for simplicity, keep it this way
Description: [CoreML EP] Add support of BatchNormalization/Reshape/Global[Average/Max]Pool
Motivation and Context