未验证 提交 9bf90922 编写于 作者: H Huihuang Zheng 提交者: GitHub

Fix test_yolov3 Random Failure (#32496)

Reduce max iter size to fix windows openblas test_yolov3 random failure.
Decrease batch size to fix pe related unittest random failure.
上级 8beb1707
...@@ -97,7 +97,7 @@ cfg.batch_size = 1 if sys.platform == 'darwin' or os.name == 'nt' else 4 ...@@ -97,7 +97,7 @@ cfg.batch_size = 1 if sys.platform == 'darwin' or os.name == 'nt' else 4
# derived learning rate the to get the final learning rate. # derived learning rate the to get the final learning rate.
cfg.learning_rate = 0.001 cfg.learning_rate = 0.001
# maximum number of iterations # maximum number of iterations
cfg.max_iter = 20 if fluid.is_compiled_with_cuda() else 2 cfg.max_iter = 20 if fluid.is_compiled_with_cuda() else 1
# Disable mixup in last N iter # Disable mixup in last N iter
cfg.no_mixup_iter = 10 if fluid.is_compiled_with_cuda() else 1 cfg.no_mixup_iter = 10 if fluid.is_compiled_with_cuda() else 1
# warm up to learning rate # warm up to learning rate
......
...@@ -173,7 +173,7 @@ model = SE_ResNeXt50Small ...@@ -173,7 +173,7 @@ model = SE_ResNeXt50Small
def batch_size(use_device): def batch_size(use_device):
if use_device == DeviceType.CUDA: if use_device == DeviceType.CUDA:
# Paddle uses 8GB P4 GPU for unittest so we decreased the batch size. # Paddle uses 8GB P4 GPU for unittest so we decreased the batch size.
return 8 return 4
return 12 return 12
......
...@@ -159,7 +159,7 @@ class TestCRFModel(unittest.TestCase): ...@@ -159,7 +159,7 @@ class TestCRFModel(unittest.TestCase):
train_data = paddle.batch( train_data = paddle.batch(
paddle.reader.shuffle( paddle.reader.shuffle(
paddle.dataset.conll05.test(), buf_size=8192), paddle.dataset.conll05.test(), buf_size=8192),
batch_size=16) batch_size=8)
place = fluid.CUDAPlace(0) if use_cuda else fluid.CPUPlace() place = fluid.CUDAPlace(0) if use_cuda else fluid.CPUPlace()
exe = fluid.Executor(place) exe = fluid.Executor(place)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册