提交 707a4213 编写于 作者: L LiuChiaChi

set paddle manual seed for unittest

上级 7afd7d4b
......@@ -618,7 +618,6 @@ class DynamicGraphAdapter(object):
# TODO multi device in dygraph mode not implemented at present time
def train_batch(self, inputs, labels=None):
assert self.model._optimizer, \
"model not ready, please call `model.prepare()` first"
self.model.network.train()
......@@ -1858,7 +1857,6 @@ class Model(object):
]
self._is_shape_inferred = True
self._inputs = self._verify_spec(None, self._shapes, True)
if mode == 'test':
return logs, outputs
return logs
......
......@@ -515,6 +515,7 @@ class TestModelFunction(unittest.TestCase):
paddle.summary(nlp_net, (1, 1, 2))
def test_export_deploy_model(self):
self.set_seed()
for dynamic in [True, False]:
paddle.disable_static() if dynamic else None
prog_translator = ProgramTranslator()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册