diff --git a/python/paddle/fluid/tests/unittests/CMakeLists.txt b/python/paddle/fluid/tests/unittests/CMakeLists.txt index 0b0ca728aa95c9be2c78bc7e189a9bfdbfcb1f56..57da05652ebeddd369684c03b81a0bbea1da139b 100755 --- a/python/paddle/fluid/tests/unittests/CMakeLists.txt +++ b/python/paddle/fluid/tests/unittests/CMakeLists.txt @@ -769,7 +769,6 @@ if(NOT WIN32) endif() add_subdirectory(sequence) -add_subdirectory(rnn) add_subdirectory(distribution) # dist xpu tests: diff --git a/python/paddle/fluid/tests/unittests/test_gru_rnn_op.py b/python/paddle/fluid/tests/unittests/test_gru_rnn_op.py index 2aa68dfb16ba64274aa518b9e3e35951a6c12e15..f68fc0d3c61ad51dac9de849a9bc88586e38e594 100644 --- a/python/paddle/fluid/tests/unittests/test_gru_rnn_op.py +++ b/python/paddle/fluid/tests/unittests/test_gru_rnn_op.py @@ -22,7 +22,7 @@ from eager_op_test import OpTest import paddle from paddle.fluid import core -sys.path.append("./rnn") +sys.path.append("../../../../../test/rnn") from convert import get_params_for_net from rnn_numpy import GRU diff --git a/python/paddle/fluid/tests/unittests/test_rnn_cell_api.py b/python/paddle/fluid/tests/unittests/test_rnn_cell_api.py index a7104e373999a9d647d60d40c6831ea7993f2f74..0c82db42fed28648277b8305d55746981f46ddbc 100644 --- a/python/paddle/fluid/tests/unittests/test_rnn_cell_api.py +++ b/python/paddle/fluid/tests/unittests/test_rnn_cell_api.py @@ -12,12 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. +import sys import unittest import numpy import numpy as np -from rnn.rnn_numpy import LSTMCell -from rnn.rnn_numpy import rnn as numpy_rnn + +sys.path.append("../../../../../test/rnn") +from rnn_numpy import LSTMCell +from rnn_numpy import rnn as numpy_rnn import paddle from paddle import fluid diff --git a/python/paddle/fluid/tests/unittests/test_rnn_op.py b/python/paddle/fluid/tests/unittests/test_rnn_op.py index e8c25f4b178ba339066fb9d85864e6a53317755b..2160ffa2ecc2a38929c20daf81cc9ee4993fed63 100644 --- a/python/paddle/fluid/tests/unittests/test_rnn_op.py +++ b/python/paddle/fluid/tests/unittests/test_rnn_op.py @@ -22,7 +22,7 @@ from eager_op_test import OpTest import paddle from paddle.fluid import core -sys.path.append("./rnn") +sys.path.append("../../../../../test/rnn") from convert import get_params_for_net from rnn_numpy import LSTM diff --git a/python/paddle/fluid/tests/unittests/test_simple_rnn_op.py b/python/paddle/fluid/tests/unittests/test_simple_rnn_op.py index 758c67036b002ca2493a94c899d6a2c7f11310ad..20bd5081d0560d0647b7acc45e1e8d0c606d8ade 100644 --- a/python/paddle/fluid/tests/unittests/test_simple_rnn_op.py +++ b/python/paddle/fluid/tests/unittests/test_simple_rnn_op.py @@ -22,9 +22,9 @@ from eager_op_test import OpTest import paddle from paddle.fluid import core -sys.path.append("./rnn") -from rnn.convert import get_params_for_net -from rnn.rnn_numpy import SimpleRNN +sys.path.append("../../../../../test/rnn") +from convert import get_params_for_net +from rnn_numpy import SimpleRNN random.seed(2) np.set_printoptions(threshold=np.inf) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 7911a47ccfa51b13256d06d836f376171f2984a3..ae98ef60835d9c985e974b2d037a768954402af1 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -122,7 +122,7 @@ if(WITH_TESTING) add_subdirectory(prim) # add_subdirectory(ps) add_subdirectory(quantization) - # add_subdirectory(rnn) + add_subdirectory(rnn) add_subdirectory(rpc) # add_subdirectory(sequence) add_subdirectory(standalone_executor) diff --git a/python/paddle/fluid/tests/unittests/rnn/CMakeLists.txt b/test/rnn/CMakeLists.txt similarity index 100% rename from python/paddle/fluid/tests/unittests/rnn/CMakeLists.txt rename to test/rnn/CMakeLists.txt diff --git a/python/paddle/fluid/tests/unittests/rnn/__init__.py b/test/rnn/__init__.py similarity index 100% rename from python/paddle/fluid/tests/unittests/rnn/__init__.py rename to test/rnn/__init__.py diff --git a/python/paddle/fluid/tests/unittests/rnn/convert.py b/test/rnn/convert.py similarity index 100% rename from python/paddle/fluid/tests/unittests/rnn/convert.py rename to test/rnn/convert.py diff --git a/python/paddle/fluid/tests/unittests/rnn/rnn_numpy.py b/test/rnn/rnn_numpy.py similarity index 100% rename from python/paddle/fluid/tests/unittests/rnn/rnn_numpy.py rename to test/rnn/rnn_numpy.py diff --git a/python/paddle/fluid/tests/unittests/rnn/test_rnn_api.py b/test/rnn/test_rnn_api.py similarity index 100% rename from python/paddle/fluid/tests/unittests/rnn/test_rnn_api.py rename to test/rnn/test_rnn_api.py diff --git a/python/paddle/fluid/tests/unittests/rnn/test_rnn_cells.py b/test/rnn/test_rnn_cells.py similarity index 100% rename from python/paddle/fluid/tests/unittests/rnn/test_rnn_cells.py rename to test/rnn/test_rnn_cells.py diff --git a/python/paddle/fluid/tests/unittests/rnn/test_rnn_cells_static.py b/test/rnn/test_rnn_cells_static.py similarity index 100% rename from python/paddle/fluid/tests/unittests/rnn/test_rnn_cells_static.py rename to test/rnn/test_rnn_cells_static.py diff --git a/python/paddle/fluid/tests/unittests/rnn/test_rnn_cudnn_params_packing.py b/test/rnn/test_rnn_cudnn_params_packing.py similarity index 100% rename from python/paddle/fluid/tests/unittests/rnn/test_rnn_cudnn_params_packing.py rename to test/rnn/test_rnn_cudnn_params_packing.py diff --git a/python/paddle/fluid/tests/unittests/rnn/test_rnn_nets.py b/test/rnn/test_rnn_nets.py old mode 100755 new mode 100644 similarity index 100% rename from python/paddle/fluid/tests/unittests/rnn/test_rnn_nets.py rename to test/rnn/test_rnn_nets.py diff --git a/python/paddle/fluid/tests/unittests/rnn/test_rnn_nets_static.py b/test/rnn/test_rnn_nets_static.py old mode 100755 new mode 100644 similarity index 100% rename from python/paddle/fluid/tests/unittests/rnn/test_rnn_nets_static.py rename to test/rnn/test_rnn_nets_static.py diff --git a/python/paddle/fluid/tests/unittests/rnn/test_wrappers.py b/test/rnn/test_wrappers.py old mode 100755 new mode 100644 similarity index 100% rename from python/paddle/fluid/tests/unittests/rnn/test_wrappers.py rename to test/rnn/test_wrappers.py