From 87a1b53bba2df3a76e3eb392aaad0227cf00e1c9 Mon Sep 17 00:00:00 2001 From: LiuChiaChi <709153940@qq.com> Date: Sun, 27 Sep 2020 06:24:20 +0000 Subject: [PATCH] fix unittets for test_model.py --- python/paddle/tests/http.log | 0 python/paddle/tests/test_model.py | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 python/paddle/tests/http.log diff --git a/python/paddle/tests/http.log b/python/paddle/tests/http.log new file mode 100644 index 0000000000..e69de29bb2 diff --git a/python/paddle/tests/test_model.py b/python/paddle/tests/test_model.py index e88a4951ec..2de39c709d 100644 --- a/python/paddle/tests/test_model.py +++ b/python/paddle/tests/test_model.py @@ -570,11 +570,11 @@ class TestModelFunction(unittest.TestCase): np.random.random((1, 1, 28, 28)), dtype=np.float32) label = np.array(np.random.rand(1, 1), dtype=np.int64) if initial == "train_batch": - model.train_batch(img, label) + model.train_batch([img], [label]) elif initial == "eval_batch": - model.eval_batch(img, label) + model.eval_batch([img], [label]) else: - model.test_batch(img) + model.test_batch([img]) model.save(save_dir, training=False) shutil.rmtree(save_dir) -- GitLab