From a61879a8c5c114701fc7ebee59aab8214a1cbab3 Mon Sep 17 00:00:00 2001 From: minqiyang Date: Thu, 25 Oct 2018 19:28:46 +0800 Subject: [PATCH] Fix dist_transformer test test=develop --- python/paddle/fluid/tests/unittests/dist_transformer.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/paddle/fluid/tests/unittests/dist_transformer.py b/python/paddle/fluid/tests/unittests/dist_transformer.py index ab4495481..23abd7953 100644 --- a/python/paddle/fluid/tests/unittests/dist_transformer.py +++ b/python/paddle/fluid/tests/unittests/dist_transformer.py @@ -1159,6 +1159,7 @@ def prepare_encoder(src_word, name=pos_enc_param_name, trainable=False, initializer=fluid.initializer.ConstantInitializer(0.001))) + str_pos_enc.stop_gradient = True enc_input = src_word_emb + src_pos_enc return layers.dropout( enc_input, -- GitLab