diff --git a/pgl/layers/conv.py b/pgl/layers/conv.py index bbb364ab64a89f8ee3ee002cd8a9294a1710f804..08c38b559489c5ad974035a60312751bdb868df6 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,