From 5d9df8c8c709064bc9248bc832e6deaf81da9d10 Mon Sep 17 00:00:00 2001 From: lvmengsi Date: Mon, 5 Aug 2019 22:30:37 +0800 Subject: [PATCH] fix dropout (#18965) Fix dropout in nn.py --- python/paddle/fluid/layers/nn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/fluid/layers/nn.py b/python/paddle/fluid/layers/nn.py index e16a250bdee..53fb3bad855 100644 --- a/python/paddle/fluid/layers/nn.py +++ b/python/paddle/fluid/layers/nn.py @@ -1558,7 +1558,7 @@ def dropout(x, 'dropout_prob': dropout_prob, 'is_test': is_test, 'fix_seed': seed is not None, - 'seed': seed, + 'seed': seed if seed is not None else 0, 'dropout_implementation': dropout_implementation, }) return out -- GitLab