forked from openvinotoolkit/openvino
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FrontEnd]enable PDPD 16 ops conversion Part2 (openvinotoolkit#6632)
* [FrontEnd]enable 16 ops conversion * [FrontEnd]fix typo in interpolate * param support tensor (#3) * Update hard_sigmoid.cpp (#4) * Yi3/fix paddle part2 * fix paddle conversion * ops forward declaration * use tile instead of broadcast * Add validation check in dropout (#8) * fix conflict * fix code style * fix transpose2 * use perm size in transpose2 * remove check in transpose2 Co-authored-by: Luo Cheng <[email protected]> Co-authored-by: Mang Guo <[email protected]>
- Loading branch information
1 parent
9a36e77
commit 81377a7
Showing
39 changed files
with
1,186 additions
and
269 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright (C) 2018-2021 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#include <ngraph/opsets/opset6.hpp> | ||
#include <node_context.hpp> | ||
#include "conv2d_utils.hpp" | ||
|
||
namespace ngraph | ||
{ | ||
namespace frontend | ||
{ | ||
namespace pdpd | ||
{ | ||
namespace op | ||
{ | ||
NamedOutputs conv2d_transpose(const NodeContext& node) | ||
{ | ||
return conv2d_base<opset6::GroupConvolutionBackpropData, | ||
opset6::ConvolutionBackpropData>(node); | ||
} | ||
|
||
} // namespace op | ||
} // namespace pdpd | ||
} // namespace frontend | ||
} // namespace ngraph |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Copyright (C) 2018-2021 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#include <ngraph/opsets/opset6.hpp> | ||
#include <node_context.hpp> | ||
|
||
namespace ngraph | ||
{ | ||
namespace frontend | ||
{ | ||
namespace pdpd | ||
{ | ||
namespace op | ||
{ | ||
NamedOutputs dropout(const NodeContext& node) | ||
{ | ||
auto data = node.get_ng_input("X"); | ||
auto dropout_implementation = | ||
node.get_attribute<std::string>("dropout_implementation"); | ||
PDPD_OP_VALIDATION_CHECK(node, | ||
(dropout_implementation == "downgrade_in_infer" || | ||
dropout_implementation == "upscale_in_train"), | ||
"Unsupported dropout mode!"); | ||
if (dropout_implementation == "downgrade_in_infer") | ||
{ | ||
auto dropout_prob = ngraph::opset6::Constant::create( | ||
ngraph::element::f32, | ||
{1}, | ||
{1 - node.get_attribute<float>("dropout_prob")}); | ||
return node.default_single_output_mapping( | ||
{std::make_shared<ngraph::opset6::Multiply>(data, dropout_prob)}, | ||
{"Out"}); | ||
} | ||
else | ||
{ | ||
return node.default_single_output_mapping(data.get_node_shared_ptr(), | ||
{"Out"}); | ||
} | ||
} | ||
|
||
} // namespace op | ||
} // namespace pdpd | ||
} // namespace frontend | ||
} // namespace ngraph |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.