Skip to content

Commit

Permalink
Refactor pool3d function to simplify output handling
Browse files Browse the repository at this point in the history
  • Loading branch information
AndPuQing committed Dec 24, 2023
1 parent 9b57135 commit da3f73b
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/frontends/paddle/src/op/pool3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,7 @@ NamedOutputs pool3d(const NodeContext& node) {
std::make_shared<default_opset::Constant>(ov::element::i64, Shape{5}, std::vector<int64_t>{0, 2, 3, 4, 1}));
}

auto output_name = node.get_output_names();
if (output_name.size() == 1) {
return NamedOutputs{{"Out", {pool_outputs[0]}}};
} else {
PADDLE_OP_CHECK(node, pool_outputs.size() == 2, "returnmask can`t use with global_pooling");
return NamedOutputs{{"Out", {pool_outputs[0]}}, {"Mask", {pool_outputs[1]}}};
}
return NamedOutputs{{"Out", {pool_outputs[0]}}};
}

NamedOutputs pool3d_with_index(const NodeContext& node) {
Expand Down

0 comments on commit da3f73b

Please sign in to comment.