未验证 提交 869d59cc 编写于 作者: C Chen Weihang 提交者: GitHub

try to fix two unittests, test=develop (#25372)

上级 bc761058
...@@ -18,10 +18,10 @@ import numpy as np ...@@ -18,10 +18,10 @@ import numpy as np
def simple_fc_net_with_inputs(img, label, class_num=10): def simple_fc_net_with_inputs(img, label, class_num=10):
hidden = img hidden = img
for _ in range(4): for _ in range(2):
hidden = fluid.layers.fc( hidden = fluid.layers.fc(
hidden, hidden,
size=200, size=100,
act='relu', act='relu',
bias_attr=fluid.ParamAttr( bias_attr=fluid.ParamAttr(
initializer=fluid.initializer.Constant(value=1.0))) initializer=fluid.initializer.Constant(value=1.0)))
......
...@@ -32,7 +32,7 @@ def create_reader(shape, batch_number): ...@@ -32,7 +32,7 @@ def create_reader(shape, batch_number):
class DataLoaderKeepOrderTestBase(unittest.TestCase): class DataLoaderKeepOrderTestBase(unittest.TestCase):
def initParameters(self): def initParameters(self):
self.iterable = False self.iterable = False
self.break_num = 10000 self.break_num = 100
def setUp(self): def setUp(self):
self.epoch_num = 3 self.epoch_num = 3
...@@ -151,7 +151,7 @@ class DataLoaderKeepOrderTestBase(unittest.TestCase): ...@@ -151,7 +151,7 @@ class DataLoaderKeepOrderTestBase(unittest.TestCase):
class IterableDataLoaderKeepOrderTest2(DataLoaderKeepOrderTestBase): class IterableDataLoaderKeepOrderTest2(DataLoaderKeepOrderTestBase):
def initParameters(self): def initParameters(self):
self.iterable = True self.iterable = True
self.break_num = 10000 self.break_num = 100
class IterableDataLoaderKeepOrderTest3(DataLoaderKeepOrderTestBase): class IterableDataLoaderKeepOrderTest3(DataLoaderKeepOrderTestBase):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册