diff --git a/python/paddle/fluid/parallel_executor.py b/python/paddle/fluid/parallel_executor.py index 9527a887a3c088c0bcc75572f4a4054c54c4bf6d..7ad5f0d740ac22c4f72eb5427c7f81aaa0a7a3dc 100644 --- a/python/paddle/fluid/parallel_executor.py +++ b/python/paddle/fluid/parallel_executor.py @@ -16,6 +16,7 @@ import core import multiprocessing import framework import executor +import warnings __all__ = ['ParallelExecutor'] @@ -130,6 +131,10 @@ class ParallelExecutor(object): or numpy array. :return: fetched value list. """ + if not feed_dict == {}: + warnings.warn( + "The 'feed_dict' of ParallelExecutor.run() is deprecated. Please use 'feed' instead." + ) if feed == {}: feed = feed_dict if not isinstance(feed, dict): diff --git a/python/paddle/fluid/tests/unittests/test_parallel_executor.py b/python/paddle/fluid/tests/unittests/test_parallel_executor.py index c376810ad5da45c785f0c81ef7c3a70fb39a5e08..b653f2c11f21e1d42a0b844d73fe34a7b778b744 100644 --- a/python/paddle/fluid/tests/unittests/test_parallel_executor.py +++ b/python/paddle/fluid/tests/unittests/test_parallel_executor.py @@ -223,7 +223,6 @@ class TestParallelExecutorBase(unittest.TestCase): with fluid.program_guard(main, startup): if seed is not None: startup.random_seed = seed - main.random_seed = seed loss = method(use_feed=len(feed_dict) > 0) adam = fluid.optimizer.Adam() adam.minimize(loss)