Skip to content

Commit

Permalink
Addressed comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Honry committed Aug 2, 2024
1 parent 27668d2 commit 9faed2b
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ class DropoutOpBuilder : public BaseOpBuilder {
void DropoutOpBuilder::AddInitializersToSkip(ModelBuilder& model_builder, const Node& node) const {
// Skip ratio and training_mode if present.
for (size_t i = 1; i < node.InputDefs().size(); i++) {
model_builder.AddInitializerToSkip(node.InputDefs()[i]->Name());
model_builder.AddInputToSkip(node.InputDefs()[i]->Name());
const auto input_name = node.InputDefs()[i]->Name();
model_builder.AddInitializerToSkip(input_name);
model_builder.AddInputToSkip(input_name);
}
}

Expand All @@ -47,7 +48,7 @@ Status DropoutOpBuilder::AddToModelBuilderImpl(ModelBuilder& model_builder,
emscripten::val options = emscripten::val::object();
options.set("label", node.Name());

// WebNN EP only supports test mode, we don't need to care about other inputs or
// WebNN EP only supports test mode. So we don't need to care about other inputs or
// attributes about training mode. Simply use WebNN's identity op to copy the input.
emscripten::val output = model_builder.GetBuilder().call<emscripten::val>("identity", input, options);

Expand Down

0 comments on commit 9faed2b

Please sign in to comment.