From 869d59ccfe58ad7682536b11bab50be229ef794c Mon Sep 17 00:00:00 2001 From: Chen Weihang Date: Mon, 6 Jul 2020 11:39:02 +0800 Subject: [PATCH] try to fix two unittests, test=develop (#25372) --- python/paddle/fluid/tests/unittests/simple_nets.py | 4 ++-- .../fluid/tests/unittests/test_dataloader_keep_order.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/python/paddle/fluid/tests/unittests/simple_nets.py b/python/paddle/fluid/tests/unittests/simple_nets.py index 5f48cc8e6a..7f22df67d1 100644 --- a/python/paddle/fluid/tests/unittests/simple_nets.py +++ b/python/paddle/fluid/tests/unittests/simple_nets.py @@ -18,10 +18,10 @@ import numpy as np def simple_fc_net_with_inputs(img, label, class_num=10): hidden = img - for _ in range(4): + for _ in range(2): hidden = fluid.layers.fc( hidden, - size=200, + size=100, act='relu', bias_attr=fluid.ParamAttr( initializer=fluid.initializer.Constant(value=1.0))) diff --git a/python/paddle/fluid/tests/unittests/test_dataloader_keep_order.py b/python/paddle/fluid/tests/unittests/test_dataloader_keep_order.py index e3fec5a62f..5796e13336 100644 --- a/python/paddle/fluid/tests/unittests/test_dataloader_keep_order.py +++ b/python/paddle/fluid/tests/unittests/test_dataloader_keep_order.py @@ -32,7 +32,7 @@ def create_reader(shape, batch_number): class DataLoaderKeepOrderTestBase(unittest.TestCase): def initParameters(self): self.iterable = False - self.break_num = 10000 + self.break_num = 100 def setUp(self): self.epoch_num = 3 @@ -151,7 +151,7 @@ class DataLoaderKeepOrderTestBase(unittest.TestCase): class IterableDataLoaderKeepOrderTest2(DataLoaderKeepOrderTestBase): def initParameters(self): self.iterable = True - self.break_num = 10000 + self.break_num = 100 class IterableDataLoaderKeepOrderTest3(DataLoaderKeepOrderTestBase): -- GitLab