From 4c18b98fcd76f55977ccea3bbd9e16da95a4482d Mon Sep 17 00:00:00 2001 From: JiabinYang Date: Wed, 3 Apr 2019 05:52:48 +0000 Subject: [PATCH] test=develop, fix transformer in dygraph / --- .../fluid/tests/unittests/test_imperative_transformer.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python/paddle/fluid/tests/unittests/test_imperative_transformer.py b/python/paddle/fluid/tests/unittests/test_imperative_transformer.py index 732f0681c..89ae3c6a3 100644 --- a/python/paddle/fluid/tests/unittests/test_imperative_transformer.py +++ b/python/paddle/fluid/tests/unittests/test_imperative_transformer.py @@ -302,8 +302,11 @@ use_py_reader = False # if we run sync mode sync = False -# how many batches we use -batch_num = 50 +if not core.is_compiled_with_cuda(): + # how many batches we use + batch_num = 50 +else: + batch_num = 5 np.random.seed = 1 src_word_np = np.random.randint( -- GitLab