diff --git a/python/paddle/fluid/tests/unittests/test_dist_mnist.py b/python/paddle/fluid/tests/unittests/test_dist_mnist.py index e6bc56cce10375194cc456a965e7bdd33ed4d255..e4d39c8b3f90848701b1e881f827eb2de3c0b369 100644 --- a/python/paddle/fluid/tests/unittests/test_dist_mnist.py +++ b/python/paddle/fluid/tests/unittests/test_dist_mnist.py @@ -27,6 +27,7 @@ import signal SEED = 1 DTYPE = "float32" +paddle.dataset.mnist.fetch() # random seed must set before configuring the network. @@ -147,7 +148,7 @@ class TestDistMnist(unittest.TestCase): os.kill(pid, signal.SIGTERM) def test_with_place(self): - p = fluid.CUDAPlace() if core.is_compiled_with_cuda( + p = fluid.CUDAPlace(0) if core.is_compiled_with_cuda( ) else fluid.CPUPlace() pserver_pid = self.start_pserver(self._ps_endpoints)