From 23291abdb6313129a68f86e8f7e8d4cefd5fc11c Mon Sep 17 00:00:00 2001 From: minqiyang Date: Wed, 26 Sep 2018 15:19:32 +0800 Subject: [PATCH] Polish code --- python/paddle/fluid/layers/nn.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/paddle/fluid/layers/nn.py b/python/paddle/fluid/layers/nn.py index f4f462ec3bb..77572268981 100644 --- a/python/paddle/fluid/layers/nn.py +++ b/python/paddle/fluid/layers/nn.py @@ -6540,7 +6540,8 @@ for func in [ def _logical_op(op_name, x, y, out=None, name=None, binary_op=True): helper = LayerHelper(op_name, **locals()) - assert x.dtype == y.dtype + if binary_op: + assert x.dtype == y.dtype if out is None: if name is None: -- GitLab