Skip to content

Conversation

@guoyu-wang
Copy link
Contributor

Description: [CoreML EP] Add support of BatchNormalization/Reshape/Global[Average/Max]Pool

Motivation and Context

  • Why is this change required? What problem does it solve?
  • If it fixes an open issue, please link to the issue here.

@guoyu-wang guoyu-wang requested a review from a team as a code owner February 9, 2021 21:31
@snnn
Copy link
Contributor

snnn commented Feb 10, 2021

/azp run Windows CPU CI Pipeline

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

<< input_size << "d shape";
return false;
}

Copy link
Contributor

@skottmckay skottmckay Feb 10, 2021

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

Copy link
Contributor Author

@guoyu-wang guoyu-wang Feb 10, 2021

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; }
};
Copy link
Contributor

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

Copy link
Contributor Author

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

@guoyu-wang guoyu-wang merged commit fd83e38 into master Feb 11, 2021
@guoyu-wang guoyu-wang deleted the gwang-msft/coreml_batch_norm_support branch February 11, 2021 01:16
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.

5 participants