Skip to content

Commit 7af42b8

Browse files
authored
[WebNN] Fix the op support limit for batchNormalization (microsoft#25856)
### Description <!-- Describe your changes. --> According to the [WebNN spec](https://www.w3.org/TR/webnn/#api-mlgraphbuilder-batchnorm), the batchNorm should have input names "mean" and "variance" instead of "input_mean" and "input_var". ### Motivation and Context This issue causes any BatchNorm with mean/variance inputs to fall back to wasm.
1 parent 3cadbdb commit 7af42b8

File tree

1 file changed

+1
-1
lines changed
  • onnxruntime/core/providers/webnn/builders

1 file changed

+1
-1
lines changed

onnxruntime/core/providers/webnn/builders/map_info.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ const std::unordered_map<std::string_view, WebnnOpInfo> op_inputs_map = {
200200
{"DequantizeLinear", {"dequantizeLinear", {{0, "input"}, {1, "scale"}, {2, "zeroPoint"}}}},
201201
{"InstanceNormalization", {"instanceNormalization", {{0, "input"}, {1, "scale"}, {2, "bias"}}}},
202202
{"GRU", {"gru", {{0, "input"}, {1, "weight"}, {2, "recurrentWeight"}, {3, "bias"}, {5, "initialHiddenState"}}}},
203-
{"BatchNormalization", {"batchNormalization", {{0, "input"}, {1, "scale"}, {2, "bias"}, {3, "input_mean"}, {4, "input_var"}}}},
203+
{"BatchNormalization", {"batchNormalization", {{0, "input"}, {1, "scale"}, {2, "bias"}, {3, "mean"}, {4, "variance"}}}},
204204
{"LSTM", {"lstm", {{0, "input"}, {1, "weight"}, {2, "recurrentWeight"}, {3, "bias"}, {5, "initialHiddenState"}, {6, "initialCellState"}, {7, "peepholeWeight"}}}},
205205
};
206206
} // namespace webnn

0 commit comments

Comments
 (0)