Skip to content

Commit

Permalink
Add validation check in dropout (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
mangguo321 authored Jul 27, 2021
1 parent 8770e55 commit 52c9b5a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ngraph/frontend/paddlepaddle/src/op/dropout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ namespace ngraph
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(
Expand Down

0 comments on commit 52c9b5a

Please sign in to comment.