From 95f0a7d9ef2b49b9f36d3ac36644d930d41b7280 Mon Sep 17 00:00:00 2001 From: Webbley Date: Wed, 22 Apr 2020 22:29:14 +0800 Subject: [PATCH] fix bug in gin layer when activation function is None --- pgl/layers/conv.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pgl/layers/conv.py b/pgl/layers/conv.py index bbb364a..08c38b5 100644 --- a/pgl/layers/conv.py +++ b/pgl/layers/conv.py @@ -239,7 +239,8 @@ def gin(gw, bias_attr=fluid.ParamAttr(name="%s_b_0" % name)) output = fluid.layers.batch_norm(output) - output = getattr(fluid.layers, activation)(output) + if activation is not None: + output = getattr(fluid.layers, activation)(output) output = fluid.layers.fc(output, size=hidden_size, -- GitLab