From f44add7b8f4a9063d1291fe56c9acda03b74153d Mon Sep 17 00:00:00 2001 From: weishengying <63448337+weishengying@users.noreply.github.com> Date: Tue, 14 Dec 2021 14:10:20 +0800 Subject: [PATCH] modify the fix_seed attribute in dropout op is a def attribute.test=develop (#38100) --- paddle/fluid/operators/dropout_op.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/operators/dropout_op.cc b/paddle/fluid/operators/dropout_op.cc index cbfb795d6a2..856bed8ac7e 100644 --- a/paddle/fluid/operators/dropout_op.cc +++ b/paddle/fluid/operators/dropout_op.cc @@ -88,8 +88,8 @@ class DropoutOpMaker : public framework::OpProtoAndCheckerMaker { "training. Setting this flag to true is only useful in " "unittest or for debug that always the same output units " "will be dropped.") - .SetDefault(false) - .AsExtra(); + .SetDefault(false); + AddAttr("seed", "Dropout random seed.").SetDefault(0).AsExtra(); AddAttr( "dropout_implementation", -- GitLab