diff --git a/python/paddle/fluid/tests/unittests/test_load_op.py b/python/paddle/fluid/tests/unittests/test_load_op.py index eaa608e5f5b31b4257c00ff768ad21652463f230..885c26e2be0a6f4d0d819ede7aa6974988c5b407 100644 --- a/python/paddle/fluid/tests/unittests/test_load_op.py +++ b/python/paddle/fluid/tests/unittests/test_load_op.py @@ -41,14 +41,14 @@ class TestLoadOp(unittest.TestCase): exe = fluid.Executor(fluid.CPUPlace()) exe.run(start_prog) fluid.io.save_persistables( - exe, dirname="/tmp/model", main_program=main_prog) + exe, dirname="./model", main_program=main_prog) def test_load(self): main_prog = fluid.Program() start_prog = fluid.Program() with fluid.program_guard(main_prog, start_prog): var = layers.create_tensor(dtype='float32') - layers.load(var, file_path='/tmp/model/w') + layers.load(var, file_path='./model/w') exe = fluid.Executor(fluid.CPUPlace()) exe.run(start_prog) diff --git a/python/paddle/fluid/tests/unittests/test_load_op_xpu.py b/python/paddle/fluid/tests/unittests/test_load_op_xpu.py index 1d7f986507ca994bc95972169c76bd32bd741b06..a5af6871be4741a0b198959d287ed57cdc9de3e6 100644 --- a/python/paddle/fluid/tests/unittests/test_load_op_xpu.py +++ b/python/paddle/fluid/tests/unittests/test_load_op_xpu.py @@ -44,14 +44,14 @@ class TestLoadOpXpu(unittest.TestCase): exe = fluid.Executor(fluid.XPUPlace(0)) exe.run(start_prog) fluid.io.save_persistables( - exe, dirname="/tmp/model", main_program=main_prog) + exe, dirname="./model", main_program=main_prog) def test_load_xpu(self): main_prog = fluid.Program() start_prog = fluid.Program() with fluid.program_guard(main_prog, start_prog): var = layers.create_tensor(dtype='float32') - layers.load(var, file_path='/tmp/model/w') + layers.load(var, file_path='./model/w') exe = fluid.Executor(fluid.XPUPlace(0)) exe.run(start_prog)