From ede33c6260f9d07995e66d1f4dd7b99ae6205eb4 Mon Sep 17 00:00:00 2001 From: ceci3 <592712189@qq.com> Date: Fri, 15 Mar 2019 03:41:17 +0000 Subject: [PATCH] fix formula in dropout --- 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 d0bff52e434..7842a8f56cd 100644 --- a/python/paddle/fluid/layers/nn.py +++ b/python/paddle/fluid/layers/nn.py @@ -1316,7 +1316,7 @@ def dropout(x, 1. downgrade_in_infer(default), downgrade the outcome at inference - train: out = input * mask - - inference: out = input * dropout_prob + - inference: out = input * (1 - dropout_prob) (mask is a tensor same shape with input, value is 0 or 1 ratio of 0 is dropout_prob) -- GitLab