Skip to content

Commit

Permalink
add GenerateProposals single layer test (#12967)
Browse files Browse the repository at this point in the history
  • Loading branch information
meiyang-intel authored Sep 8, 2022
1 parent facf990 commit 0f5a45c
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1660,6 +1660,25 @@ std::shared_ptr<ov::Model> generateGatherNDBase(const std::shared_ptr<ov::op::Op
return std::make_shared<ov::Model>(results, params, "GatherNDBaseGraph");
}

std::shared_ptr<ov::Model> generate(const std::shared_ptr<ov::op::v9::GenerateProposals> &node) {
const auto params = ngraph::builder::makeDynamicParams(ov::element::f32, {{1, 3}, {2, 2, 3, 4}, {1, 12, 2, 2}, {1, 3, 2, 2}});
const auto outputs =
ngraph::helpers::convert2OutputVector(ngraph::helpers::castOps2Nodes<ov::op::v0::Parameter>(params));
ov::op::v9::GenerateProposals::Attributes attrs;
attrs.min_size = 1;
attrs.nms_threshold = 0.8;
attrs.pre_nms_count = 100;
attrs.post_nms_count = 100;
if (ov::is_type<ov::op::v9::GenerateProposals>(node)) {
const auto gp = std::make_shared<ov::op::v9::GenerateProposals>(
outputs[0], outputs[1], outputs[2], outputs[3], attrs);
ov::ResultVector results{std::make_shared<ov::op::v0::Result>(gp)};
return std::make_shared<ov::Model>(results, params, "GenerateProposalsGraph");
} else {
return nullptr;
}
}

std::shared_ptr<ov::Model> generateRNNCellBase(const std::shared_ptr<ov::op::Op> &node) {
std::shared_ptr<ov::Node> RNNCellBaseNode;
if (ov::is_type<ov::op::v3::GRUCell>(node)) {
Expand Down

0 comments on commit 0f5a45c

Please sign in to comment.