From 07d72a8b2c401d13766050da9a6993eb9b090a10 Mon Sep 17 00:00:00 2001 From: zhhsplendid Date: Fri, 23 Apr 2021 06:55:32 +0000 Subject: [PATCH] Also Fix Other Unittests by Decrease Batch Size --- python/paddle/fluid/tests/unittests/seresnext_net.py | 2 +- .../paddle/fluid/tests/unittests/test_parallel_executor_crf.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/paddle/fluid/tests/unittests/seresnext_net.py b/python/paddle/fluid/tests/unittests/seresnext_net.py index 2e4b1828c5bbe..1f02562dcb4fb 100644 --- a/python/paddle/fluid/tests/unittests/seresnext_net.py +++ b/python/paddle/fluid/tests/unittests/seresnext_net.py @@ -173,7 +173,7 @@ def optimizer(learning_rate=0.01): def batch_size(use_device): if use_device == DeviceType.CUDA: # Paddle uses 8GB P4 GPU for unittest so we decreased the batch size. - return 8 + return 4 return 12 diff --git a/python/paddle/fluid/tests/unittests/test_parallel_executor_crf.py b/python/paddle/fluid/tests/unittests/test_parallel_executor_crf.py index ea59a7f584a2d..47d286fb6ab32 100644 --- a/python/paddle/fluid/tests/unittests/test_parallel_executor_crf.py +++ b/python/paddle/fluid/tests/unittests/test_parallel_executor_crf.py @@ -159,7 +159,7 @@ def check_network_convergence(self, train_data = paddle.batch( paddle.reader.shuffle( paddle.dataset.conll05.test(), buf_size=8192), - batch_size=16) + batch_size=8) place = fluid.CUDAPlace(0) if use_cuda else fluid.CPUPlace() exe = fluid.Executor(place)