Skip to content

Commit 4d94c91

Browse files
committed
Address comment
1 parent 55c9969 commit 4d94c91

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

onnxruntime/core/providers/webnn/builders/impl/softmax_op_builder.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,7 @@ Status SoftmaxOpBuilder::AddToModelBuilderImpl(ModelBuilder& model_builder,
4848
input_shape_uint32 = GetNarrowedIntFromInt64<uint32_t>(input_shape);
4949
// Need to reshape the input to 2D tensor with new shape [M, N].
5050
// M = d0*d1*...*d(axis-1), N = d(axis)*...*d(n-1)
51-
const auto M = axis == 0
52-
? 1
53-
: Product(std::vector<uint32_t>(input_shape_uint32.begin(), input_shape_uint32.begin() + axis));
51+
const auto M = Product(std::vector<uint32_t>(input_shape_uint32.begin(), input_shape_uint32.begin() + axis));
5452
const auto N = Product(std::vector<uint32_t>(input_shape_uint32.begin() + axis, input_shape_uint32.end()));
5553
emscripten::val new_shape = emscripten::val::array();
5654
new_shape.set(0, M);

0 commit comments

Comments
 (0)