-
Notifications
You must be signed in to change notification settings - Fork 53
BatchNormalization should be an optional operation #187
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
BatchNorm is actually fully supported as a native operation in DirectML. It is true that for performance benefit it is often fused with the preceding convolution and following |
Thanks, @wchao1115. Given that TF Lite does not have this op, would it be ok to mark it as optional in the spec? It's fine if the DirectML implementation includes it by default. It would be nice if the spec focuses first on what's common to all the major ML frameworks. |
For the implementation that lacks native support for this operation, it can be entirely implemented by compositing other operations as illustrated in the note section of the batchNormalization operation spec. I don't think we can define this operation as optional because it'll break the user's expectation. |
Many complex operations in the spec are given decompositions, showing how the operation could be replaced through the use of more primitive operations. This text is repeated in many places. Improve this in two ways: * Use Bikeshed's Text Macro[1] to reduce the repetition. * Streamline the text, and make it explicit that if the underlying platform doesn't support an operation, WebNN API implementations can use the decomposition as a guide to emulate it. The macro [EMULATED] is used at the end of an intro sentence since there are variations - some of the decompositions are grouped, and some make assumptions (e.g. activation functions, layouts, etc). If we assume that implementations must implement all operations in the spec, either via the underlying platform or emulation, this fixes webmachinelearning#187 [1] https://speced.github.io/bikeshed/#metadata-text-macro
Many complex operations in the spec are given decompositions, showing how the operation could be replaced through the use of more primitive operations. This text is repeated in many places. Improve this in two ways: * Use Bikeshed's Text Macro[1] to reduce the repetition. * Streamline the text, and make it explicit that if the underlying platform doesn't support an operation, WebNN API implementations can use the decomposition as a guide to emulate it. The macro [EMULATED] is used at the end of an intro sentence since there are variations - some of the decompositions are grouped, and some make assumptions (e.g. activation functions, layouts, etc). If we assume that implementations must implement all operations in the spec, either via the underlying platform or emulation, this fixes webmachinelearning#187 [1] https://speced.github.io/bikeshed/#metadata-text-macro
…638) Many complex operations in the spec are given decompositions, showing how the operation could be replaced through the use of more primitive operations. This text is repeated in many places. Improve this in two ways: * Use Bikeshed's Text Macro[1] to reduce the repetition. * Streamline the text, and make it explicit that if the underlying platform doesn't support an operation, WebNN API implementations can use the decomposition as a guide to emulate it. The macro [EMULATED] is used at the end of an intro sentence since there are variations - some of the decompositions are grouped, and some make assumptions (e.g. activation functions, layouts, etc). If we assume that implementations must implement all operations in the spec, either via the underlying platform or emulation, this fixes #187 [1] https://speced.github.io/bikeshed/#metadata-text-macro
BatchNormalization usually are optimized away for inference (fused into conv2d op filter and bias), for example TFLite does not have this op, for compatibility purpose we shall move this op to optional section of the spec.
The text was updated successfully, but these errors were encountered: