From 02626c490a08ec1aaead232264f6f25ea4f14238 Mon Sep 17 00:00:00 2001 From: mangguo Date: Mon, 26 Jul 2021 21:38:55 -0400 Subject: [PATCH] Add validation check in dropout --- ngraph/frontend/paddlepaddle/src/op/dropout.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ngraph/frontend/paddlepaddle/src/op/dropout.cpp b/ngraph/frontend/paddlepaddle/src/op/dropout.cpp index c75a5f23e13a17..56509e7becf8c3 100644 --- a/ngraph/frontend/paddlepaddle/src/op/dropout.cpp +++ b/ngraph/frontend/paddlepaddle/src/op/dropout.cpp @@ -18,6 +18,10 @@ namespace ngraph auto data = node.get_ng_input("X"); auto dropout_implementation = node.get_attribute("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(