From 4f3c8a41bef21baeec308338d94ce5f328329260 Mon Sep 17 00:00:00 2001 From: Jiabin Yang Date: Thu, 7 Mar 2019 23:00:36 +0800 Subject: [PATCH] test=develop, fix layers bug (#16099) --- python/paddle/fluid/imperative/nn.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/paddle/fluid/imperative/nn.py b/python/paddle/fluid/imperative/nn.py index 4786f8b8ad3..5aff3ea2d1f 100644 --- a/python/paddle/fluid/imperative/nn.py +++ b/python/paddle/fluid/imperative/nn.py @@ -205,7 +205,7 @@ class FC(layers.Layer): self._num_flatten_dims = num_flatten_dims self._dtype = dtype self._param_attr = param_attr - self._bias_attr = param_attr + self._bias_attr = bias_attr self._act = act def _build_once(self, input): @@ -219,10 +219,10 @@ class FC(layers.Layer): dtype=self._dtype, is_bias=False) - if self._param_attr: + if self._bias_attr: size = list([self._size]) self._b = self.create_parameter( - attr=self._param_attr, + attr=self._bias_attr, shape=size, dtype=self._dtype, is_bias=True) -- GitLab