From 9fc13fde189093250e9a20e77d2822307ed22f96 Mon Sep 17 00:00:00 2001 From: minqiyang Date: Thu, 26 Jul 2018 23:25:00 +0800 Subject: [PATCH] Remove python3 relative import of unittest --- python/paddle/fluid/tests/unittests/benchmark.py | 2 +- python/paddle/fluid/tests/unittests/benchmark_sum_op.py | 4 ++-- python/paddle/fluid/tests/unittests/op_test.py | 2 +- python/paddle/fluid/tests/unittests/test_accuracy_op.py | 2 +- .../fluid/tests/unittests/test_activation_mkldnn_op.py | 4 ++-- python/paddle/fluid/tests/unittests/test_activation_op.py | 2 +- python/paddle/fluid/tests/unittests/test_adadelta_op.py | 2 +- python/paddle/fluid/tests/unittests/test_adagrad_op.py | 2 +- python/paddle/fluid/tests/unittests/test_adam_op.py | 2 +- python/paddle/fluid/tests/unittests/test_adamax_op.py | 2 +- .../fluid/tests/unittests/test_anchor_generator_op.py | 2 +- python/paddle/fluid/tests/unittests/test_arg_min_max_op.py | 2 +- python/paddle/fluid/tests/unittests/test_argsort_op.py | 2 +- python/paddle/fluid/tests/unittests/test_assign_op.py | 2 +- python/paddle/fluid/tests/unittests/test_assign_value_op.py | 2 +- python/paddle/fluid/tests/unittests/test_auc_op.py | 2 +- .../fluid/tests/unittests/test_batch_norm_mkldnn_op.py | 4 ++-- python/paddle/fluid/tests/unittests/test_batch_norm_op.py | 2 +- .../paddle/fluid/tests/unittests/test_bilinear_interp_op.py | 2 +- .../tests/unittests/test_bilinear_tensor_product_op.py | 2 +- .../paddle/fluid/tests/unittests/test_bipartite_match_op.py | 2 +- python/paddle/fluid/tests/unittests/test_box_coder_op.py | 2 +- python/paddle/fluid/tests/unittests/test_cast_op.py | 2 +- python/paddle/fluid/tests/unittests/test_chunk_eval_op.py | 2 +- python/paddle/fluid/tests/unittests/test_clip_by_norm_op.py | 2 +- python/paddle/fluid/tests/unittests/test_clip_op.py | 2 +- python/paddle/fluid/tests/unittests/test_compare_op.py | 2 +- python/paddle/fluid/tests/unittests/test_concat_op.py | 2 +- .../paddle/fluid/tests/unittests/test_conv2d_mkldnn_op.py | 2 +- python/paddle/fluid/tests/unittests/test_conv2d_op.py | 2 +- .../fluid/tests/unittests/test_conv2d_transpose_op.py | 2 +- python/paddle/fluid/tests/unittests/test_conv3d_op.py | 2 +- .../fluid/tests/unittests/test_conv3d_transpose_op.py | 2 +- python/paddle/fluid/tests/unittests/test_conv_shift_op.py | 2 +- python/paddle/fluid/tests/unittests/test_cos_sim_op.py | 2 +- python/paddle/fluid/tests/unittests/test_crf_decoding_op.py | 2 +- python/paddle/fluid/tests/unittests/test_crop_op.py | 2 +- .../paddle/fluid/tests/unittests/test_cross_entropy_op.py | 2 +- python/paddle/fluid/tests/unittests/test_ctc_align.py | 4 ++-- python/paddle/fluid/tests/unittests/test_cumsum_op.py | 2 +- .../paddle/fluid/tests/unittests/test_decayed_adagrad_op.py | 2 +- .../paddle/fluid/tests/unittests/test_detection_map_op.py | 2 +- python/paddle/fluid/tests/unittests/test_dropout_op.py | 2 +- .../fluid/tests/unittests/test_dynrnn_gradient_check.py | 2 +- .../paddle/fluid/tests/unittests/test_edit_distance_op.py | 2 +- .../fluid/tests/unittests/test_elementwise_add_mkldnn_op.py | 4 ++-- .../paddle/fluid/tests/unittests/test_elementwise_add_op.py | 2 +- .../paddle/fluid/tests/unittests/test_elementwise_div_op.py | 2 +- .../paddle/fluid/tests/unittests/test_elementwise_max_op.py | 2 +- .../paddle/fluid/tests/unittests/test_elementwise_min_op.py | 2 +- .../paddle/fluid/tests/unittests/test_elementwise_mul_op.py | 2 +- .../paddle/fluid/tests/unittests/test_elementwise_pow_op.py | 2 +- .../paddle/fluid/tests/unittests/test_elementwise_sub_op.py | 2 +- python/paddle/fluid/tests/unittests/test_expand_op.py | 2 +- .../paddle/fluid/tests/unittests/test_fake_dequantize_op.py | 2 +- .../paddle/fluid/tests/unittests/test_fake_quantize_op.py | 2 +- python/paddle/fluid/tests/unittests/test_fc_mkldnn_op.py | 2 +- python/paddle/fluid/tests/unittests/test_fetch_var.py | 2 +- .../unittests/test_fill_constant_batch_size_like_op.py | 2 +- .../paddle/fluid/tests/unittests/test_fill_constant_op.py | 2 +- python/paddle/fluid/tests/unittests/test_fill_op.py | 2 +- .../paddle/fluid/tests/unittests/test_fill_zeros_like_op.py | 2 +- python/paddle/fluid/tests/unittests/test_ftrl_op.py | 2 +- python/paddle/fluid/tests/unittests/test_gather_op.py | 2 +- .../unittests/test_gaussian_random_batch_size_like_op.py | 2 +- .../fluid/tests/unittests/test_gaussian_random_mkldnn_op.py | 2 +- python/paddle/fluid/tests/unittests/test_get_places_op.py | 2 +- python/paddle/fluid/tests/unittests/test_gru_op.py | 4 ++-- python/paddle/fluid/tests/unittests/test_gru_unit_op.py | 2 +- python/paddle/fluid/tests/unittests/test_hinge_loss_op.py | 2 +- python/paddle/fluid/tests/unittests/test_hsigmoid_op.py | 2 +- python/paddle/fluid/tests/unittests/test_huber_loss_op.py | 2 +- python/paddle/fluid/tests/unittests/test_im2sequence_op.py | 2 +- .../paddle/fluid/tests/unittests/test_iou_similarity_op.py | 2 +- python/paddle/fluid/tests/unittests/test_is_empty_op.py | 2 +- python/paddle/fluid/tests/unittests/test_l1_norm_op.py | 2 +- python/paddle/fluid/tests/unittests/test_label_smooth_op.py | 2 +- python/paddle/fluid/tests/unittests/test_layers.py | 2 +- .../fluid/tests/unittests/test_linear_chain_crf_op.py | 2 +- .../paddle/fluid/tests/unittests/test_listen_and_serv_op.py | 2 +- python/paddle/fluid/tests/unittests/test_lod_reset_op.py | 2 +- python/paddle/fluid/tests/unittests/test_log_loss_op.py | 2 +- python/paddle/fluid/tests/unittests/test_logical_op.py | 2 +- .../fluid/tests/unittests/test_lookup_sparse_table_op.py | 2 +- python/paddle/fluid/tests/unittests/test_lookup_table_op.py | 2 +- python/paddle/fluid/tests/unittests/test_lrn_mkldnn_op.py | 2 +- python/paddle/fluid/tests/unittests/test_lrn_op.py | 2 +- python/paddle/fluid/tests/unittests/test_lstm_op.py | 2 +- python/paddle/fluid/tests/unittests/test_lstm_unit_op.py | 2 +- python/paddle/fluid/tests/unittests/test_lstmp_op.py | 2 +- .../fluid/tests/unittests/test_margin_rank_loss_op.py | 2 +- python/paddle/fluid/tests/unittests/test_math_op_patch.py | 2 +- python/paddle/fluid/tests/unittests/test_matmul_op.py | 2 +- python/paddle/fluid/tests/unittests/test_maxout_op.py | 2 +- python/paddle/fluid/tests/unittests/test_mean_iou.py | 2 +- python/paddle/fluid/tests/unittests/test_mean_op.py | 2 +- python/paddle/fluid/tests/unittests/test_merge_ids_op.py | 2 +- .../fluid/tests/unittests/test_mine_hard_examples_op.py | 2 +- python/paddle/fluid/tests/unittests/test_minus_op.py | 2 +- .../fluid/tests/unittests/test_modified_huber_loss_op.py | 2 +- python/paddle/fluid/tests/unittests/test_momentum_op.py | 2 +- python/paddle/fluid/tests/unittests/test_mul_op.py | 2 +- .../paddle/fluid/tests/unittests/test_multiclass_nms_op.py | 2 +- python/paddle/fluid/tests/unittests/test_multiplex_op.py | 2 +- python/paddle/fluid/tests/unittests/test_nce.py | 2 +- python/paddle/fluid/tests/unittests/test_norm_op.py | 2 +- python/paddle/fluid/tests/unittests/test_one_hot_op.py | 2 +- python/paddle/fluid/tests/unittests/test_pad_op.py | 2 +- .../fluid/tests/unittests/test_parallel_executor_mnist.py | 2 +- .../tests/unittests/test_parallel_executor_seresnext.py | 2 +- .../tests/unittests/test_parallel_executor_transformer.py | 4 ++-- .../fluid/tests/unittests/test_polygon_box_transform.py | 2 +- .../paddle/fluid/tests/unittests/test_pool2d_mkldnn_op.py | 2 +- python/paddle/fluid/tests/unittests/test_pool2d_op.py | 2 +- python/paddle/fluid/tests/unittests/test_pool3d_op.py | 2 +- python/paddle/fluid/tests/unittests/test_pool_max_op.py | 2 +- .../fluid/tests/unittests/test_positive_negative_pair_op.py | 2 +- .../fluid/tests/unittests/test_precision_recall_op.py | 2 +- python/paddle/fluid/tests/unittests/test_prelu_op.py | 2 +- python/paddle/fluid/tests/unittests/test_prior_box_op.py | 2 +- .../fluid/tests/unittests/test_proximal_adagrad_op.py | 2 +- python/paddle/fluid/tests/unittests/test_proximal_gd_op.py | 2 +- python/paddle/fluid/tests/unittests/test_random_crop_op.py | 2 +- python/paddle/fluid/tests/unittests/test_rank_loss_op.py | 2 +- python/paddle/fluid/tests/unittests/test_reduce_op.py | 2 +- python/paddle/fluid/tests/unittests/test_registry.py | 2 +- python/paddle/fluid/tests/unittests/test_reshape_op.py | 2 +- python/paddle/fluid/tests/unittests/test_reverse_op.py | 2 +- python/paddle/fluid/tests/unittests/test_rmsprop_op.py | 2 +- python/paddle/fluid/tests/unittests/test_roi_pool_op.py | 2 +- python/paddle/fluid/tests/unittests/test_row_conv_op.py | 2 +- .../fluid/tests/unittests/test_rpn_target_assign_op.py | 2 +- python/paddle/fluid/tests/unittests/test_scale_op.py | 2 +- python/paddle/fluid/tests/unittests/test_scatter_op.py | 2 +- python/paddle/fluid/tests/unittests/test_seq_concat_op.py | 2 +- python/paddle/fluid/tests/unittests/test_seq_conv.py | 2 +- python/paddle/fluid/tests/unittests/test_seq_pool.py | 2 +- .../paddle/fluid/tests/unittests/test_sequence_erase_op.py | 2 +- python/paddle/fluid/tests/unittests/test_sequence_expand.py | 2 +- .../paddle/fluid/tests/unittests/test_sequence_reshape.py | 2 +- .../paddle/fluid/tests/unittests/test_sequence_slice_op.py | 2 +- .../fluid/tests/unittests/test_sequence_softmax_op.py | 4 ++-- python/paddle/fluid/tests/unittests/test_sgd_op.py | 2 +- python/paddle/fluid/tests/unittests/test_shape_op.py | 2 +- .../unittests/test_sigmoid_cross_entropy_with_logits_op.py | 2 +- python/paddle/fluid/tests/unittests/test_sign_op.py | 2 +- python/paddle/fluid/tests/unittests/test_slice_op.py | 2 +- .../paddle/fluid/tests/unittests/test_smooth_l1_loss_op.py | 2 +- python/paddle/fluid/tests/unittests/test_softmax_op.py | 2 +- .../tests/unittests/test_softmax_with_cross_entropy_op.py | 4 ++-- python/paddle/fluid/tests/unittests/test_split_ids_op.py | 2 +- python/paddle/fluid/tests/unittests/test_split_op.py | 2 +- python/paddle/fluid/tests/unittests/test_spp_op.py | 6 +++--- .../fluid/tests/unittests/test_squared_l2_distance_op.py | 2 +- .../paddle/fluid/tests/unittests/test_squared_l2_norm_op.py | 2 +- python/paddle/fluid/tests/unittests/test_squeeze_op.py | 2 +- python/paddle/fluid/tests/unittests/test_sum_mkldnn_op.py | 2 +- python/paddle/fluid/tests/unittests/test_sum_op.py | 2 +- .../paddle/fluid/tests/unittests/test_target_assign_op.py | 2 +- python/paddle/fluid/tests/unittests/test_top_k_op.py | 2 +- python/paddle/fluid/tests/unittests/test_transpose_op.py | 2 +- .../unittests/test_uniform_random_batch_size_like_op.py | 2 +- .../paddle/fluid/tests/unittests/test_uniform_random_op.py | 2 +- python/paddle/fluid/tests/unittests/test_unpool_op.py | 2 +- python/paddle/fluid/tests/unittests/test_unsqueeze_op.py | 2 +- python/paddle/fluid/tests/unittests/test_warpctc_op.py | 4 ++-- 166 files changed, 178 insertions(+), 178 deletions(-) diff --git a/python/paddle/fluid/tests/unittests/benchmark.py b/python/paddle/fluid/tests/unittests/benchmark.py index 92559965497..f3c48d3d7f4 100644 --- a/python/paddle/fluid/tests/unittests/benchmark.py +++ b/python/paddle/fluid/tests/unittests/benchmark.py @@ -20,7 +20,7 @@ import itertools import paddle.fluid as fluid import paddle.fluid.core as core from paddle.fluid.op import Operator -from .op_test import OpTest +from op_test import OpTest class BenchmarkSuite(OpTest): diff --git a/python/paddle/fluid/tests/unittests/benchmark_sum_op.py b/python/paddle/fluid/tests/unittests/benchmark_sum_op.py index b222320d7c3..91a5f1bca44 100644 --- a/python/paddle/fluid/tests/unittests/benchmark_sum_op.py +++ b/python/paddle/fluid/tests/unittests/benchmark_sum_op.py @@ -16,8 +16,8 @@ import unittest import numpy as np import paddle.fluid as fluid -from .benchmark import BenchmarkSuite -from .op_test import OpTest +from benchmark import BenchmarkSuite +from op_test import OpTest # This is a demo op test case for operator benchmarking and high resolution number stability alignment. diff --git a/python/paddle/fluid/tests/unittests/op_test.py b/python/paddle/fluid/tests/unittests/op_test.py index d6b730add7d..d5bdc28c5d6 100644 --- a/python/paddle/fluid/tests/unittests/op_test.py +++ b/python/paddle/fluid/tests/unittests/op_test.py @@ -25,7 +25,7 @@ from paddle.fluid.backward import append_backward from paddle.fluid.op import Operator from paddle.fluid.executor import Executor from paddle.fluid.framework import Program, OpProtoHolder, Variable -from .testsuite import create_op, set_input, append_input_output, append_loss_ops +from testsuite import create_op, set_input, append_input_output, append_loss_ops from functools import reduce from six.moves import zip diff --git a/python/paddle/fluid/tests/unittests/test_accuracy_op.py b/python/paddle/fluid/tests/unittests/test_accuracy_op.py index f6958cc8932..db1861fd10e 100644 --- a/python/paddle/fluid/tests/unittests/test_accuracy_op.py +++ b/python/paddle/fluid/tests/unittests/test_accuracy_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestAccuracyOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_activation_mkldnn_op.py b/python/paddle/fluid/tests/unittests/test_activation_mkldnn_op.py index 99913a94f86..7d554c2276c 100644 --- a/python/paddle/fluid/tests/unittests/test_activation_mkldnn_op.py +++ b/python/paddle/fluid/tests/unittests/test_activation_mkldnn_op.py @@ -15,9 +15,9 @@ import unittest import numpy as np import paddle.fluid.core as core -from .op_test import OpTest +from op_test import OpTest from scipy.special import expit -from .test_activation_op import TestRelu, TestTanh, TestSqrt, TestAbs +from test_activation_op import TestRelu, TestTanh, TestSqrt, TestAbs class TestMKLDNNReluDim2(TestRelu): diff --git a/python/paddle/fluid/tests/unittests/test_activation_op.py b/python/paddle/fluid/tests/unittests/test_activation_op.py index d12aec885b3..5ed387fb124 100644 --- a/python/paddle/fluid/tests/unittests/test_activation_op.py +++ b/python/paddle/fluid/tests/unittests/test_activation_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np import paddle.fluid.core as core -from .op_test import OpTest +from op_test import OpTest from scipy.special import expit diff --git a/python/paddle/fluid/tests/unittests/test_adadelta_op.py b/python/paddle/fluid/tests/unittests/test_adadelta_op.py index c8fa469270f..1b892e64c76 100644 --- a/python/paddle/fluid/tests/unittests/test_adadelta_op.py +++ b/python/paddle/fluid/tests/unittests/test_adadelta_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestAdadeltaOp1(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_adagrad_op.py b/python/paddle/fluid/tests/unittests/test_adagrad_op.py index 1f4432782ba..2f0ea79f4d6 100644 --- a/python/paddle/fluid/tests/unittests/test_adagrad_op.py +++ b/python/paddle/fluid/tests/unittests/test_adagrad_op.py @@ -16,7 +16,7 @@ import unittest import numpy as np import paddle.fluid.core as core from paddle.fluid.op import Operator -from .op_test import OpTest +from op_test import OpTest import math diff --git a/python/paddle/fluid/tests/unittests/test_adam_op.py b/python/paddle/fluid/tests/unittests/test_adam_op.py index 1ff9bf9be19..fa4b39879c0 100644 --- a/python/paddle/fluid/tests/unittests/test_adam_op.py +++ b/python/paddle/fluid/tests/unittests/test_adam_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest from paddle.fluid import core from paddle.fluid.op import Operator diff --git a/python/paddle/fluid/tests/unittests/test_adamax_op.py b/python/paddle/fluid/tests/unittests/test_adamax_op.py index 668303ea2c9..8099beefa58 100644 --- a/python/paddle/fluid/tests/unittests/test_adamax_op.py +++ b/python/paddle/fluid/tests/unittests/test_adamax_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestAdamaxOp1(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_anchor_generator_op.py b/python/paddle/fluid/tests/unittests/test_anchor_generator_op.py index 2c22e3c5e2e..9c7d5d41f0c 100644 --- a/python/paddle/fluid/tests/unittests/test_anchor_generator_op.py +++ b/python/paddle/fluid/tests/unittests/test_anchor_generator_op.py @@ -16,7 +16,7 @@ import unittest import numpy as np import sys import math -from .op_test import OpTest +from op_test import OpTest def anchor_generator_in_python(input_feat, anchor_sizes, aspect_ratios, diff --git a/python/paddle/fluid/tests/unittests/test_arg_min_max_op.py b/python/paddle/fluid/tests/unittests/test_arg_min_max_op.py index 22f03ede179..e04412f809c 100644 --- a/python/paddle/fluid/tests/unittests/test_arg_min_max_op.py +++ b/python/paddle/fluid/tests/unittests/test_arg_min_max_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class BaseTestCase(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_argsort_op.py b/python/paddle/fluid/tests/unittests/test_argsort_op.py index 7f6c0db448b..b29a102a388 100644 --- a/python/paddle/fluid/tests/unittests/test_argsort_op.py +++ b/python/paddle/fluid/tests/unittests/test_argsort_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestArgsortOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_assign_op.py b/python/paddle/fluid/tests/unittests/test_assign_op.py index 872f4df2339..e93c02bd3ee 100644 --- a/python/paddle/fluid/tests/unittests/test_assign_op.py +++ b/python/paddle/fluid/tests/unittests/test_assign_op.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from . import op_test +import op_test import numpy import unittest diff --git a/python/paddle/fluid/tests/unittests/test_assign_value_op.py b/python/paddle/fluid/tests/unittests/test_assign_value_op.py index 1c13446faa0..02f2e6eddc8 100644 --- a/python/paddle/fluid/tests/unittests/test_assign_value_op.py +++ b/python/paddle/fluid/tests/unittests/test_assign_value_op.py @@ -14,7 +14,7 @@ import paddle.fluid as fluid import paddle.fluid.layers as layers -from . import op_test +import op_test import numpy import unittest import paddle.fluid.framework as framework diff --git a/python/paddle/fluid/tests/unittests/test_auc_op.py b/python/paddle/fluid/tests/unittests/test_auc_op.py index 48b63a1b237..6580c70ca68 100644 --- a/python/paddle/fluid/tests/unittests/test_auc_op.py +++ b/python/paddle/fluid/tests/unittests/test_auc_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest from paddle.fluid import metrics diff --git a/python/paddle/fluid/tests/unittests/test_batch_norm_mkldnn_op.py b/python/paddle/fluid/tests/unittests/test_batch_norm_mkldnn_op.py index 1317906e5f3..18fa5461590 100644 --- a/python/paddle/fluid/tests/unittests/test_batch_norm_mkldnn_op.py +++ b/python/paddle/fluid/tests/unittests/test_batch_norm_mkldnn_op.py @@ -17,9 +17,9 @@ import numpy as np import paddle.fluid.core as core from paddle.fluid.op import Operator import paddle.fluid as fluid -from .op_test import OpTest +from op_test import OpTest from paddle.fluid.framework import grad_var_name -from .test_batch_norm_op import TestBatchNormOpInference, TestBatchNormOpTraining, _reference_training, _reference_grad +from test_batch_norm_op import TestBatchNormOpInference, TestBatchNormOpTraining, _reference_training, _reference_grad class TestMKLDNNBatchNormOpTraining(TestBatchNormOpTraining): diff --git a/python/paddle/fluid/tests/unittests/test_batch_norm_op.py b/python/paddle/fluid/tests/unittests/test_batch_norm_op.py index d83f82665f2..f805fdc35f6 100644 --- a/python/paddle/fluid/tests/unittests/test_batch_norm_op.py +++ b/python/paddle/fluid/tests/unittests/test_batch_norm_op.py @@ -17,7 +17,7 @@ import numpy as np import paddle.fluid.core as core from paddle.fluid.op import Operator import paddle.fluid as fluid -from .op_test import OpTest +from op_test import OpTest from paddle.fluid.framework import grad_var_name diff --git a/python/paddle/fluid/tests/unittests/test_bilinear_interp_op.py b/python/paddle/fluid/tests/unittests/test_bilinear_interp_op.py index 7a0945060ae..b04f25ef874 100644 --- a/python/paddle/fluid/tests/unittests/test_bilinear_interp_op.py +++ b/python/paddle/fluid/tests/unittests/test_bilinear_interp_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest import paddle.fluid.core as core diff --git a/python/paddle/fluid/tests/unittests/test_bilinear_tensor_product_op.py b/python/paddle/fluid/tests/unittests/test_bilinear_tensor_product_op.py index 83440ddda26..d20a11e27ea 100644 --- a/python/paddle/fluid/tests/unittests/test_bilinear_tensor_product_op.py +++ b/python/paddle/fluid/tests/unittests/test_bilinear_tensor_product_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestBilinearTensorProductOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_bipartite_match_op.py b/python/paddle/fluid/tests/unittests/test_bipartite_match_op.py index dba93a8fd07..ceeca25b74d 100644 --- a/python/paddle/fluid/tests/unittests/test_bipartite_match_op.py +++ b/python/paddle/fluid/tests/unittests/test_bipartite_match_op.py @@ -13,7 +13,7 @@ #limitations under the License. import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest def bipartite_match(distance, match_indices, match_dist): diff --git a/python/paddle/fluid/tests/unittests/test_box_coder_op.py b/python/paddle/fluid/tests/unittests/test_box_coder_op.py index 99449177db6..4ce9a4783e2 100644 --- a/python/paddle/fluid/tests/unittests/test_box_coder_op.py +++ b/python/paddle/fluid/tests/unittests/test_box_coder_op.py @@ -16,7 +16,7 @@ import unittest import numpy as np import sys import math -from .op_test import OpTest +from op_test import OpTest def box_coder(target_box, prior_box, prior_box_var, output_box, code_type, diff --git a/python/paddle/fluid/tests/unittests/test_cast_op.py b/python/paddle/fluid/tests/unittests/test_cast_op.py index 164c28917f4..b8d3ed3aa3e 100644 --- a/python/paddle/fluid/tests/unittests/test_cast_op.py +++ b/python/paddle/fluid/tests/unittests/test_cast_op.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from . import op_test +import op_test import unittest import numpy as np import paddle.fluid.core as core diff --git a/python/paddle/fluid/tests/unittests/test_chunk_eval_op.py b/python/paddle/fluid/tests/unittests/test_chunk_eval_op.py index be95b6092ef..354110f1f96 100644 --- a/python/paddle/fluid/tests/unittests/test_chunk_eval_op.py +++ b/python/paddle/fluid/tests/unittests/test_chunk_eval_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class Segment(object): diff --git a/python/paddle/fluid/tests/unittests/test_clip_by_norm_op.py b/python/paddle/fluid/tests/unittests/test_clip_by_norm_op.py index a4b8122f2f2..129958fa281 100644 --- a/python/paddle/fluid/tests/unittests/test_clip_by_norm_op.py +++ b/python/paddle/fluid/tests/unittests/test_clip_by_norm_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestClipByNormOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_clip_op.py b/python/paddle/fluid/tests/unittests/test_clip_op.py index c542bdd76f0..3df80c8ec8f 100644 --- a/python/paddle/fluid/tests/unittests/test_clip_op.py +++ b/python/paddle/fluid/tests/unittests/test_clip_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestClipOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_compare_op.py b/python/paddle/fluid/tests/unittests/test_compare_op.py index 3d8ed33f3b9..405afebae85 100644 --- a/python/paddle/fluid/tests/unittests/test_compare_op.py +++ b/python/paddle/fluid/tests/unittests/test_compare_op.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from . import op_test +import op_test import unittest import numpy diff --git a/python/paddle/fluid/tests/unittests/test_concat_op.py b/python/paddle/fluid/tests/unittests/test_concat_op.py index e71805b9325..e9f3c45dc40 100644 --- a/python/paddle/fluid/tests/unittests/test_concat_op.py +++ b/python/paddle/fluid/tests/unittests/test_concat_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestConcatOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_conv2d_mkldnn_op.py b/python/paddle/fluid/tests/unittests/test_conv2d_mkldnn_op.py index 3e4739805ae..db6be21baaa 100644 --- a/python/paddle/fluid/tests/unittests/test_conv2d_mkldnn_op.py +++ b/python/paddle/fluid/tests/unittests/test_conv2d_mkldnn_op.py @@ -14,7 +14,7 @@ import unittest -from .test_conv2d_op import TestConv2dOp, TestWithPad, TestWithStride +from test_conv2d_op import TestConv2dOp, TestWithPad, TestWithStride class TestMKLDNN(TestConv2dOp): diff --git a/python/paddle/fluid/tests/unittests/test_conv2d_op.py b/python/paddle/fluid/tests/unittests/test_conv2d_op.py index 71f421ee484..a478649541b 100644 --- a/python/paddle/fluid/tests/unittests/test_conv2d_op.py +++ b/python/paddle/fluid/tests/unittests/test_conv2d_op.py @@ -16,7 +16,7 @@ import unittest import numpy as np import paddle.fluid.core as core -from .op_test import OpTest +from op_test import OpTest def conv2d_forward_naive(input, filter, group, conv_param): diff --git a/python/paddle/fluid/tests/unittests/test_conv2d_transpose_op.py b/python/paddle/fluid/tests/unittests/test_conv2d_transpose_op.py index eb3bdbdde52..af6cd99b0d7 100644 --- a/python/paddle/fluid/tests/unittests/test_conv2d_transpose_op.py +++ b/python/paddle/fluid/tests/unittests/test_conv2d_transpose_op.py @@ -16,7 +16,7 @@ import unittest import numpy as np import paddle.fluid.core as core -from .op_test import OpTest +from op_test import OpTest def conv2dtranspose_forward_naive(input_, filter_, attrs): diff --git a/python/paddle/fluid/tests/unittests/test_conv3d_op.py b/python/paddle/fluid/tests/unittests/test_conv3d_op.py index f0eec4de0a0..dd4ef7cc94e 100644 --- a/python/paddle/fluid/tests/unittests/test_conv3d_op.py +++ b/python/paddle/fluid/tests/unittests/test_conv3d_op.py @@ -16,7 +16,7 @@ import unittest import numpy as np import paddle.fluid.core as core -from .op_test import OpTest +from op_test import OpTest def conv3d_forward_naive(input, filter, group, conv_param): diff --git a/python/paddle/fluid/tests/unittests/test_conv3d_transpose_op.py b/python/paddle/fluid/tests/unittests/test_conv3d_transpose_op.py index 6500044b736..300fa5e8bde 100644 --- a/python/paddle/fluid/tests/unittests/test_conv3d_transpose_op.py +++ b/python/paddle/fluid/tests/unittests/test_conv3d_transpose_op.py @@ -16,7 +16,7 @@ import unittest import numpy as np import paddle.fluid.core as core -from .op_test import OpTest +from op_test import OpTest def conv3dtranspose_forward_naive(input_, filter_, attrs): diff --git a/python/paddle/fluid/tests/unittests/test_conv_shift_op.py b/python/paddle/fluid/tests/unittests/test_conv_shift_op.py index 4b8d76114c2..9fdb7baa90d 100644 --- a/python/paddle/fluid/tests/unittests/test_conv_shift_op.py +++ b/python/paddle/fluid/tests/unittests/test_conv_shift_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest def conv_shift_forward(x, y): diff --git a/python/paddle/fluid/tests/unittests/test_cos_sim_op.py b/python/paddle/fluid/tests/unittests/test_cos_sim_op.py index 6da63d786e0..1b27cd57670 100644 --- a/python/paddle/fluid/tests/unittests/test_cos_sim_op.py +++ b/python/paddle/fluid/tests/unittests/test_cos_sim_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestCosSimOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_crf_decoding_op.py b/python/paddle/fluid/tests/unittests/test_crf_decoding_op.py index b77b7a5dff3..122b076c2d3 100644 --- a/python/paddle/fluid/tests/unittests/test_crf_decoding_op.py +++ b/python/paddle/fluid/tests/unittests/test_crf_decoding_op.py @@ -16,7 +16,7 @@ import unittest import random import numpy as np -from .op_test import OpTest +from op_test import OpTest class CRFDecoding(object): diff --git a/python/paddle/fluid/tests/unittests/test_crop_op.py b/python/paddle/fluid/tests/unittests/test_crop_op.py index 94fc17a4b05..4016089c016 100644 --- a/python/paddle/fluid/tests/unittests/test_crop_op.py +++ b/python/paddle/fluid/tests/unittests/test_crop_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest def crop(data, offsets, crop_shape): diff --git a/python/paddle/fluid/tests/unittests/test_cross_entropy_op.py b/python/paddle/fluid/tests/unittests/test_cross_entropy_op.py index 1b19a9c0f8d..c5b9e92d691 100644 --- a/python/paddle/fluid/tests/unittests/test_cross_entropy_op.py +++ b/python/paddle/fluid/tests/unittests/test_cross_entropy_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest, randomize_probability +from op_test import OpTest, randomize_probability class TestCrossEntropyOp1(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_ctc_align.py b/python/paddle/fluid/tests/unittests/test_ctc_align.py index ba8e9ba53d0..131b4076f45 100644 --- a/python/paddle/fluid/tests/unittests/test_ctc_align.py +++ b/python/paddle/fluid/tests/unittests/test_ctc_align.py @@ -15,8 +15,8 @@ import sys import unittest import numpy as np -from .op_test import OpTest -from .test_softmax_op import stable_softmax +from op_test import OpTest +from test_softmax_op import stable_softmax def CTCAlign(input, lod, blank, merge_repeated): diff --git a/python/paddle/fluid/tests/unittests/test_cumsum_op.py b/python/paddle/fluid/tests/unittests/test_cumsum_op.py index a7a509ff859..04e7f0b9451 100644 --- a/python/paddle/fluid/tests/unittests/test_cumsum_op.py +++ b/python/paddle/fluid/tests/unittests/test_cumsum_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestSumOp1(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_decayed_adagrad_op.py b/python/paddle/fluid/tests/unittests/test_decayed_adagrad_op.py index 484193b8543..84c44d48173 100644 --- a/python/paddle/fluid/tests/unittests/test_decayed_adagrad_op.py +++ b/python/paddle/fluid/tests/unittests/test_decayed_adagrad_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestDecayedAdagradOp1(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_detection_map_op.py b/python/paddle/fluid/tests/unittests/test_detection_map_op.py index a71447ebe30..8b66d1b2709 100644 --- a/python/paddle/fluid/tests/unittests/test_detection_map_op.py +++ b/python/paddle/fluid/tests/unittests/test_detection_map_op.py @@ -17,7 +17,7 @@ import numpy as np import sys import collections import math -from .op_test import OpTest +from op_test import OpTest class TestDetectionMAPOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_dropout_op.py b/python/paddle/fluid/tests/unittests/test_dropout_op.py index 0b1e1e9388a..eaa3435a864 100644 --- a/python/paddle/fluid/tests/unittests/test_dropout_op.py +++ b/python/paddle/fluid/tests/unittests/test_dropout_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np import paddle.fluid.core as core -from .op_test import OpTest +from op_test import OpTest class TestDropoutOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_dynrnn_gradient_check.py b/python/paddle/fluid/tests/unittests/test_dynrnn_gradient_check.py index 0cb57f45b00..5b204a1ed6e 100644 --- a/python/paddle/fluid/tests/unittests/test_dynrnn_gradient_check.py +++ b/python/paddle/fluid/tests/unittests/test_dynrnn_gradient_check.py @@ -17,7 +17,7 @@ import random import collections import paddle.fluid as fluid import unittest -from .decorators import * +from decorators import * class Memory(object): diff --git a/python/paddle/fluid/tests/unittests/test_edit_distance_op.py b/python/paddle/fluid/tests/unittests/test_edit_distance_op.py index 00abd19cd90..816562621b4 100644 --- a/python/paddle/fluid/tests/unittests/test_edit_distance_op.py +++ b/python/paddle/fluid/tests/unittests/test_edit_distance_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest def Levenshtein(hyp, ref): diff --git a/python/paddle/fluid/tests/unittests/test_elementwise_add_mkldnn_op.py b/python/paddle/fluid/tests/unittests/test_elementwise_add_mkldnn_op.py index afdbabd6a2a..bcdbfc8e527 100644 --- a/python/paddle/fluid/tests/unittests/test_elementwise_add_mkldnn_op.py +++ b/python/paddle/fluid/tests/unittests/test_elementwise_add_mkldnn_op.py @@ -14,8 +14,8 @@ import unittest import numpy as np import paddle.fluid.core as core -from .op_test import OpTest -from .test_elementwise_add_op import * +from op_test import OpTest +from test_elementwise_add_op import * ''' Some tests differ from the tests defined in test_elementwise_add_op.py because MKLDNN does not support tensors of number of dimensions 3. diff --git a/python/paddle/fluid/tests/unittests/test_elementwise_add_op.py b/python/paddle/fluid/tests/unittests/test_elementwise_add_op.py index 432901fbb07..fb9a496126f 100644 --- a/python/paddle/fluid/tests/unittests/test_elementwise_add_op.py +++ b/python/paddle/fluid/tests/unittests/test_elementwise_add_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np import paddle.fluid.core as core -from .op_test import OpTest +from op_test import OpTest class TestElementwiseAddOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_elementwise_div_op.py b/python/paddle/fluid/tests/unittests/test_elementwise_div_op.py index 4244e1132a2..bfe022af6da 100644 --- a/python/paddle/fluid/tests/unittests/test_elementwise_div_op.py +++ b/python/paddle/fluid/tests/unittests/test_elementwise_div_op.py @@ -13,7 +13,7 @@ # limitations under the License. import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class ElementwiseDivOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_elementwise_max_op.py b/python/paddle/fluid/tests/unittests/test_elementwise_max_op.py index 3796d0af92d..b6cd18a5795 100644 --- a/python/paddle/fluid/tests/unittests/test_elementwise_max_op.py +++ b/python/paddle/fluid/tests/unittests/test_elementwise_max_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestElementwiseOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_elementwise_min_op.py b/python/paddle/fluid/tests/unittests/test_elementwise_min_op.py index 826e8a9619a..92099724fe6 100644 --- a/python/paddle/fluid/tests/unittests/test_elementwise_min_op.py +++ b/python/paddle/fluid/tests/unittests/test_elementwise_min_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestElementwiseOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_elementwise_mul_op.py b/python/paddle/fluid/tests/unittests/test_elementwise_mul_op.py index 5195f7b5f21..2742bb21d95 100644 --- a/python/paddle/fluid/tests/unittests/test_elementwise_mul_op.py +++ b/python/paddle/fluid/tests/unittests/test_elementwise_mul_op.py @@ -13,7 +13,7 @@ # limitations under the License. import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class ElementwiseMulOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_elementwise_pow_op.py b/python/paddle/fluid/tests/unittests/test_elementwise_pow_op.py index be9f82943f0..a3fd18669c5 100644 --- a/python/paddle/fluid/tests/unittests/test_elementwise_pow_op.py +++ b/python/paddle/fluid/tests/unittests/test_elementwise_pow_op.py @@ -13,7 +13,7 @@ # limitations under the License. import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestElementwisePowOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_elementwise_sub_op.py b/python/paddle/fluid/tests/unittests/test_elementwise_sub_op.py index bbf113aed2d..acf652d3fb9 100644 --- a/python/paddle/fluid/tests/unittests/test_elementwise_sub_op.py +++ b/python/paddle/fluid/tests/unittests/test_elementwise_sub_op.py @@ -13,7 +13,7 @@ # limitations under the License. import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestElementwiseOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_expand_op.py b/python/paddle/fluid/tests/unittests/test_expand_op.py index 8239ea7ae7c..a91e3aef5a1 100644 --- a/python/paddle/fluid/tests/unittests/test_expand_op.py +++ b/python/paddle/fluid/tests/unittests/test_expand_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestExpandOpRank1(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_fake_dequantize_op.py b/python/paddle/fluid/tests/unittests/test_fake_dequantize_op.py index b0a773bf208..026ac2112b2 100644 --- a/python/paddle/fluid/tests/unittests/test_fake_dequantize_op.py +++ b/python/paddle/fluid/tests/unittests/test_fake_dequantize_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np import math -from .op_test import OpTest +from op_test import OpTest def quantize_max_abs(x, num_bits): diff --git a/python/paddle/fluid/tests/unittests/test_fake_quantize_op.py b/python/paddle/fluid/tests/unittests/test_fake_quantize_op.py index 72fba806091..6c6aa9d3bb6 100644 --- a/python/paddle/fluid/tests/unittests/test_fake_quantize_op.py +++ b/python/paddle/fluid/tests/unittests/test_fake_quantize_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestFakeQuantizeOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_fc_mkldnn_op.py b/python/paddle/fluid/tests/unittests/test_fc_mkldnn_op.py index 1476061a12e..3f547f3c484 100644 --- a/python/paddle/fluid/tests/unittests/test_fc_mkldnn_op.py +++ b/python/paddle/fluid/tests/unittests/test_fc_mkldnn_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest def fully_connected_naive(input, weights, bias_data=None): diff --git a/python/paddle/fluid/tests/unittests/test_fetch_var.py b/python/paddle/fluid/tests/unittests/test_fetch_var.py index 80994ef4ab4..46c3bbb6712 100644 --- a/python/paddle/fluid/tests/unittests/test_fetch_var.py +++ b/python/paddle/fluid/tests/unittests/test_fetch_var.py @@ -14,7 +14,7 @@ import paddle.fluid as fluid import paddle.fluid.layers as layers -from . import op_test +import op_test import numpy import unittest diff --git a/python/paddle/fluid/tests/unittests/test_fill_constant_batch_size_like_op.py b/python/paddle/fluid/tests/unittests/test_fill_constant_batch_size_like_op.py index 7533db80cb2..0c75cf33f5f 100644 --- a/python/paddle/fluid/tests/unittests/test_fill_constant_batch_size_like_op.py +++ b/python/paddle/fluid/tests/unittests/test_fill_constant_batch_size_like_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestFillConstantBatchSizeLikeWhenFirstDimIsBatchSize(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_fill_constant_op.py b/python/paddle/fluid/tests/unittests/test_fill_constant_op.py index d94a25b49c0..5e2ddb218af 100644 --- a/python/paddle/fluid/tests/unittests/test_fill_constant_op.py +++ b/python/paddle/fluid/tests/unittests/test_fill_constant_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestFillConstantOp1(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_fill_op.py b/python/paddle/fluid/tests/unittests/test_fill_op.py index 09b949871bf..762d29199e2 100644 --- a/python/paddle/fluid/tests/unittests/test_fill_op.py +++ b/python/paddle/fluid/tests/unittests/test_fill_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest import paddle.fluid.core as core diff --git a/python/paddle/fluid/tests/unittests/test_fill_zeros_like_op.py b/python/paddle/fluid/tests/unittests/test_fill_zeros_like_op.py index 23ab9dd18bd..c9b3e4ba138 100644 --- a/python/paddle/fluid/tests/unittests/test_fill_zeros_like_op.py +++ b/python/paddle/fluid/tests/unittests/test_fill_zeros_like_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestFillZerosLikeOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_ftrl_op.py b/python/paddle/fluid/tests/unittests/test_ftrl_op.py index 1b593be37de..5f7581391af 100644 --- a/python/paddle/fluid/tests/unittests/test_ftrl_op.py +++ b/python/paddle/fluid/tests/unittests/test_ftrl_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestFTRLOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_gather_op.py b/python/paddle/fluid/tests/unittests/test_gather_op.py index df782c99093..4ae90864806 100644 --- a/python/paddle/fluid/tests/unittests/test_gather_op.py +++ b/python/paddle/fluid/tests/unittests/test_gather_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestGatherOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_gaussian_random_batch_size_like_op.py b/python/paddle/fluid/tests/unittests/test_gaussian_random_batch_size_like_op.py index fed7989495d..1398166a74e 100644 --- a/python/paddle/fluid/tests/unittests/test_gaussian_random_batch_size_like_op.py +++ b/python/paddle/fluid/tests/unittests/test_gaussian_random_batch_size_like_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestGaussianRandomBatchSizeLike(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_gaussian_random_mkldnn_op.py b/python/paddle/fluid/tests/unittests/test_gaussian_random_mkldnn_op.py index e14c5d668a1..3ae877a6081 100644 --- a/python/paddle/fluid/tests/unittests/test_gaussian_random_mkldnn_op.py +++ b/python/paddle/fluid/tests/unittests/test_gaussian_random_mkldnn_op.py @@ -14,7 +14,7 @@ import unittest -from .test_gaussian_random_op import TestGaussianRandomOp +from test_gaussian_random_op import TestGaussianRandomOp class TestMKLDNN(TestGaussianRandomOp): diff --git a/python/paddle/fluid/tests/unittests/test_get_places_op.py b/python/paddle/fluid/tests/unittests/test_get_places_op.py index 06b088bac0d..964423e2d26 100644 --- a/python/paddle/fluid/tests/unittests/test_get_places_op.py +++ b/python/paddle/fluid/tests/unittests/test_get_places_op.py @@ -14,7 +14,7 @@ import paddle.fluid as fluid from paddle.fluid.layers.device import get_places -from . import decorators +import decorators import unittest diff --git a/python/paddle/fluid/tests/unittests/test_gru_op.py b/python/paddle/fluid/tests/unittests/test_gru_op.py index 2f93b0dc2cf..86a2c674d01 100644 --- a/python/paddle/fluid/tests/unittests/test_gru_op.py +++ b/python/paddle/fluid/tests/unittests/test_gru_op.py @@ -15,8 +15,8 @@ import unittest import numpy as np import math -from .op_test import OpTest -from .test_lstm_op import identity, sigmoid, tanh, relu +from op_test import OpTest +from test_lstm_op import identity, sigmoid, tanh, relu class TestGRUOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_gru_unit_op.py b/python/paddle/fluid/tests/unittests/test_gru_unit_op.py index 68359f6f514..87a9eba4d97 100644 --- a/python/paddle/fluid/tests/unittests/test_gru_unit_op.py +++ b/python/paddle/fluid/tests/unittests/test_gru_unit_op.py @@ -15,7 +15,7 @@ import math import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class GRUActivationType(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_hinge_loss_op.py b/python/paddle/fluid/tests/unittests/test_hinge_loss_op.py index 6d8aba98ea1..70586c6be3d 100644 --- a/python/paddle/fluid/tests/unittests/test_hinge_loss_op.py +++ b/python/paddle/fluid/tests/unittests/test_hinge_loss_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestHingeLossOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_hsigmoid_op.py b/python/paddle/fluid/tests/unittests/test_hsigmoid_op.py index 9abe44db7de..d090960c84e 100644 --- a/python/paddle/fluid/tests/unittests/test_hsigmoid_op.py +++ b/python/paddle/fluid/tests/unittests/test_hsigmoid_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np import math -from .op_test import OpTest +from op_test import OpTest def find_latest_set(num): diff --git a/python/paddle/fluid/tests/unittests/test_huber_loss_op.py b/python/paddle/fluid/tests/unittests/test_huber_loss_op.py index ed19c39e04d..a8d0a776255 100644 --- a/python/paddle/fluid/tests/unittests/test_huber_loss_op.py +++ b/python/paddle/fluid/tests/unittests/test_huber_loss_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest def huber_loss_forward(val, delta): diff --git a/python/paddle/fluid/tests/unittests/test_im2sequence_op.py b/python/paddle/fluid/tests/unittests/test_im2sequence_op.py index 4f5954f59c6..13bc5768740 100644 --- a/python/paddle/fluid/tests/unittests/test_im2sequence_op.py +++ b/python/paddle/fluid/tests/unittests/test_im2sequence_op.py @@ -13,7 +13,7 @@ #limitations under the License. import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest def get_output_shape(attrs, in_shape, img_real_size): diff --git a/python/paddle/fluid/tests/unittests/test_iou_similarity_op.py b/python/paddle/fluid/tests/unittests/test_iou_similarity_op.py index 53d31d20d09..eff4212d91e 100644 --- a/python/paddle/fluid/tests/unittests/test_iou_similarity_op.py +++ b/python/paddle/fluid/tests/unittests/test_iou_similarity_op.py @@ -17,7 +17,7 @@ import numpy as np import numpy.random as random import sys import math -from .op_test import OpTest +from op_test import OpTest class TestIOUSimilarityOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_is_empty_op.py b/python/paddle/fluid/tests/unittests/test_is_empty_op.py index 33777dfecbc..11121d9b653 100644 --- a/python/paddle/fluid/tests/unittests/test_is_empty_op.py +++ b/python/paddle/fluid/tests/unittests/test_is_empty_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestEmpty(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_l1_norm_op.py b/python/paddle/fluid/tests/unittests/test_l1_norm_op.py index f5e139fcfd8..fa5b18a16f7 100644 --- a/python/paddle/fluid/tests/unittests/test_l1_norm_op.py +++ b/python/paddle/fluid/tests/unittests/test_l1_norm_op.py @@ -14,7 +14,7 @@ import numpy as np import unittest -from .op_test import OpTest +from op_test import OpTest class TestL1NormOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_label_smooth_op.py b/python/paddle/fluid/tests/unittests/test_label_smooth_op.py index 081852b6f1a..ca21289a0d4 100644 --- a/python/paddle/fluid/tests/unittests/test_label_smooth_op.py +++ b/python/paddle/fluid/tests/unittests/test_label_smooth_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestLabelSmoothOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_layers.py b/python/paddle/fluid/tests/unittests/test_layers.py index 2d33c8cfaa7..bbddf1a0a40 100644 --- a/python/paddle/fluid/tests/unittests/test_layers.py +++ b/python/paddle/fluid/tests/unittests/test_layers.py @@ -20,7 +20,7 @@ from paddle.fluid.layers.device import get_places import paddle.fluid.nets as nets from paddle.fluid.framework import Program, program_guard, default_main_program from paddle.fluid.param_attr import ParamAttr -from . import decorators +import decorators class TestBook(unittest.TestCase): diff --git a/python/paddle/fluid/tests/unittests/test_linear_chain_crf_op.py b/python/paddle/fluid/tests/unittests/test_linear_chain_crf_op.py index 0d0286e104c..696d0ab4fa8 100644 --- a/python/paddle/fluid/tests/unittests/test_linear_chain_crf_op.py +++ b/python/paddle/fluid/tests/unittests/test_linear_chain_crf_op.py @@ -16,7 +16,7 @@ import unittest import random import numpy as np -from .op_test import OpTest +from op_test import OpTest class LinearChainCrfForward(object): diff --git a/python/paddle/fluid/tests/unittests/test_listen_and_serv_op.py b/python/paddle/fluid/tests/unittests/test_listen_and_serv_op.py index 9f24acb569b..1cdc6950104 100644 --- a/python/paddle/fluid/tests/unittests/test_listen_and_serv_op.py +++ b/python/paddle/fluid/tests/unittests/test_listen_and_serv_op.py @@ -20,7 +20,7 @@ import subprocess import time import unittest from multiprocessing import Process -from .op_test import OpTest +from op_test import OpTest def run_pserver(use_cuda, sync_mode, ip, port, trainers, trainer_id): diff --git a/python/paddle/fluid/tests/unittests/test_lod_reset_op.py b/python/paddle/fluid/tests/unittests/test_lod_reset_op.py index 3ca440e1c4d..77905c4b964 100644 --- a/python/paddle/fluid/tests/unittests/test_lod_reset_op.py +++ b/python/paddle/fluid/tests/unittests/test_lod_reset_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestLodResetOpByAttr(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_log_loss_op.py b/python/paddle/fluid/tests/unittests/test_log_loss_op.py index 033442bcfb0..d3980b8db93 100644 --- a/python/paddle/fluid/tests/unittests/test_log_loss_op.py +++ b/python/paddle/fluid/tests/unittests/test_log_loss_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestLogLossOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_logical_op.py b/python/paddle/fluid/tests/unittests/test_logical_op.py index 6bf93b1a38b..1d7dfe60f20 100644 --- a/python/paddle/fluid/tests/unittests/test_logical_op.py +++ b/python/paddle/fluid/tests/unittests/test_logical_op.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from . import op_test +import op_test import unittest import numpy as np diff --git a/python/paddle/fluid/tests/unittests/test_lookup_sparse_table_op.py b/python/paddle/fluid/tests/unittests/test_lookup_sparse_table_op.py index bf3e7420aec..aa9eae1e882 100644 --- a/python/paddle/fluid/tests/unittests/test_lookup_sparse_table_op.py +++ b/python/paddle/fluid/tests/unittests/test_lookup_sparse_table_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest import paddle.fluid.core as core from paddle.fluid.op import Operator diff --git a/python/paddle/fluid/tests/unittests/test_lookup_table_op.py b/python/paddle/fluid/tests/unittests/test_lookup_table_op.py index bb69e3a9afc..487a7b74357 100644 --- a/python/paddle/fluid/tests/unittests/test_lookup_table_op.py +++ b/python/paddle/fluid/tests/unittests/test_lookup_table_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest import paddle.fluid.core as core from paddle.fluid.op import Operator diff --git a/python/paddle/fluid/tests/unittests/test_lrn_mkldnn_op.py b/python/paddle/fluid/tests/unittests/test_lrn_mkldnn_op.py index b82e438f121..966a16dc870 100644 --- a/python/paddle/fluid/tests/unittests/test_lrn_mkldnn_op.py +++ b/python/paddle/fluid/tests/unittests/test_lrn_mkldnn_op.py @@ -13,7 +13,7 @@ # limitations under the License. import unittest -from .test_lrn_op import TestLRNOp +from test_lrn_op import TestLRNOp class TestLRNMKLDNNOp(TestLRNOp): diff --git a/python/paddle/fluid/tests/unittests/test_lrn_op.py b/python/paddle/fluid/tests/unittests/test_lrn_op.py index a7539e43ecc..eaff45cbb2a 100644 --- a/python/paddle/fluid/tests/unittests/test_lrn_op.py +++ b/python/paddle/fluid/tests/unittests/test_lrn_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestLRNOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_lstm_op.py b/python/paddle/fluid/tests/unittests/test_lstm_op.py index 421e1cb8aa8..705a24bd8f3 100644 --- a/python/paddle/fluid/tests/unittests/test_lstm_op.py +++ b/python/paddle/fluid/tests/unittests/test_lstm_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest SIGMOID_THRESHOLD_MIN = -40.0 SIGMOID_THRESHOLD_MAX = 13.0 diff --git a/python/paddle/fluid/tests/unittests/test_lstm_unit_op.py b/python/paddle/fluid/tests/unittests/test_lstm_unit_op.py index fd3e2f24ae8..e343265874f 100644 --- a/python/paddle/fluid/tests/unittests/test_lstm_unit_op.py +++ b/python/paddle/fluid/tests/unittests/test_lstm_unit_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest def sigmoid_np(x): diff --git a/python/paddle/fluid/tests/unittests/test_lstmp_op.py b/python/paddle/fluid/tests/unittests/test_lstmp_op.py index 0527b9ac6a3..ed2262da4bc 100644 --- a/python/paddle/fluid/tests/unittests/test_lstmp_op.py +++ b/python/paddle/fluid/tests/unittests/test_lstmp_op.py @@ -13,7 +13,7 @@ #limitations under the License. import unittest import numpy as np -from . import test_lstm_op as LstmTest +import test_lstm_op as LstmTest ACTIVATION = { 'identity': LstmTest.identity, diff --git a/python/paddle/fluid/tests/unittests/test_margin_rank_loss_op.py b/python/paddle/fluid/tests/unittests/test_margin_rank_loss_op.py index d4e2cee0888..97c112487fd 100644 --- a/python/paddle/fluid/tests/unittests/test_margin_rank_loss_op.py +++ b/python/paddle/fluid/tests/unittests/test_margin_rank_loss_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestMarginRankLossOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_math_op_patch.py b/python/paddle/fluid/tests/unittests/test_math_op_patch.py index 73419cedc4b..852a80261e0 100644 --- a/python/paddle/fluid/tests/unittests/test_math_op_patch.py +++ b/python/paddle/fluid/tests/unittests/test_math_op_patch.py @@ -13,7 +13,7 @@ # limitations under the License. import unittest -from . import decorators +import decorators import paddle.fluid as fluid import numpy diff --git a/python/paddle/fluid/tests/unittests/test_matmul_op.py b/python/paddle/fluid/tests/unittests/test_matmul_op.py index 6d7c015ce4e..cae2c8fa87d 100644 --- a/python/paddle/fluid/tests/unittests/test_matmul_op.py +++ b/python/paddle/fluid/tests/unittests/test_matmul_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest def generate_compatible_shapes(dim_X, dim_Y, transpose_X, transpose_Y): diff --git a/python/paddle/fluid/tests/unittests/test_maxout_op.py b/python/paddle/fluid/tests/unittests/test_maxout_op.py index 1bea7e58d3d..f5ddf72516b 100644 --- a/python/paddle/fluid/tests/unittests/test_maxout_op.py +++ b/python/paddle/fluid/tests/unittests/test_maxout_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest def maxout_forward_naive(input, groups): diff --git a/python/paddle/fluid/tests/unittests/test_mean_iou.py b/python/paddle/fluid/tests/unittests/test_mean_iou.py index 986bfa1d35b..32b4ee18478 100644 --- a/python/paddle/fluid/tests/unittests/test_mean_iou.py +++ b/python/paddle/fluid/tests/unittests/test_mean_iou.py @@ -15,7 +15,7 @@ from __future__ import division import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest def compute_mean_iou(predictions, labels, num_classes, in_wrongs, in_corrects, diff --git a/python/paddle/fluid/tests/unittests/test_mean_op.py b/python/paddle/fluid/tests/unittests/test_mean_op.py index 9fa1b993a32..15472a8fc47 100644 --- a/python/paddle/fluid/tests/unittests/test_mean_op.py +++ b/python/paddle/fluid/tests/unittests/test_mean_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestMeanOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_merge_ids_op.py b/python/paddle/fluid/tests/unittests/test_merge_ids_op.py index 56c4872ad42..f209bdf30fa 100644 --- a/python/paddle/fluid/tests/unittests/test_merge_ids_op.py +++ b/python/paddle/fluid/tests/unittests/test_merge_ids_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestMergeIdsOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_mine_hard_examples_op.py b/python/paddle/fluid/tests/unittests/test_mine_hard_examples_op.py index ba495959841..54ee85c1a7a 100644 --- a/python/paddle/fluid/tests/unittests/test_mine_hard_examples_op.py +++ b/python/paddle/fluid/tests/unittests/test_mine_hard_examples_op.py @@ -16,7 +16,7 @@ import unittest import numpy as np import sys import math -from .op_test import OpTest +from op_test import OpTest class TestMineHardExamplesOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_minus_op.py b/python/paddle/fluid/tests/unittests/test_minus_op.py index d238b8102b4..ee32bd49925 100644 --- a/python/paddle/fluid/tests/unittests/test_minus_op.py +++ b/python/paddle/fluid/tests/unittests/test_minus_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestMinusOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_modified_huber_loss_op.py b/python/paddle/fluid/tests/unittests/test_modified_huber_loss_op.py index df4fc8ce92e..62035efe8ec 100644 --- a/python/paddle/fluid/tests/unittests/test_modified_huber_loss_op.py +++ b/python/paddle/fluid/tests/unittests/test_modified_huber_loss_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest def modified_huber_loss_forward(val): diff --git a/python/paddle/fluid/tests/unittests/test_momentum_op.py b/python/paddle/fluid/tests/unittests/test_momentum_op.py index 1a3d655ab9b..c75d3bd276a 100644 --- a/python/paddle/fluid/tests/unittests/test_momentum_op.py +++ b/python/paddle/fluid/tests/unittests/test_momentum_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestMomentumOp1(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_mul_op.py b/python/paddle/fluid/tests/unittests/test_mul_op.py index ccec6060a8f..bbc782c1bce 100644 --- a/python/paddle/fluid/tests/unittests/test_mul_op.py +++ b/python/paddle/fluid/tests/unittests/test_mul_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np import paddle.fluid.core as core -from .op_test import OpTest +from op_test import OpTest class TestMulOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_multiclass_nms_op.py b/python/paddle/fluid/tests/unittests/test_multiclass_nms_op.py index 2a645e42b0e..10cb78a08db 100644 --- a/python/paddle/fluid/tests/unittests/test_multiclass_nms_op.py +++ b/python/paddle/fluid/tests/unittests/test_multiclass_nms_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np import copy -from .op_test import OpTest +from op_test import OpTest def iou(box_a, box_b): diff --git a/python/paddle/fluid/tests/unittests/test_multiplex_op.py b/python/paddle/fluid/tests/unittests/test_multiplex_op.py index 7e8717ebd51..03cad8b43ba 100644 --- a/python/paddle/fluid/tests/unittests/test_multiplex_op.py +++ b/python/paddle/fluid/tests/unittests/test_multiplex_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestMultiplexOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_nce.py b/python/paddle/fluid/tests/unittests/test_nce.py index 5aa08fafcdf..7431a142c53 100644 --- a/python/paddle/fluid/tests/unittests/test_nce.py +++ b/python/paddle/fluid/tests/unittests/test_nce.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest def nce(input, weight, bias, sample_weight, labels, num_classes, diff --git a/python/paddle/fluid/tests/unittests/test_norm_op.py b/python/paddle/fluid/tests/unittests/test_norm_op.py index 84ef777b760..108a665f37f 100644 --- a/python/paddle/fluid/tests/unittests/test_norm_op.py +++ b/python/paddle/fluid/tests/unittests/test_norm_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest def l2_norm(x, axis, epsilon): diff --git a/python/paddle/fluid/tests/unittests/test_one_hot_op.py b/python/paddle/fluid/tests/unittests/test_one_hot_op.py index ab63ba226ab..06fccd39ac6 100644 --- a/python/paddle/fluid/tests/unittests/test_one_hot_op.py +++ b/python/paddle/fluid/tests/unittests/test_one_hot_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np import math -from .op_test import OpTest +from op_test import OpTest import paddle.fluid as fluid import paddle.fluid.core as core import paddle.fluid.framework as framework diff --git a/python/paddle/fluid/tests/unittests/test_pad_op.py b/python/paddle/fluid/tests/unittests/test_pad_op.py index deb7637f2b8..300f3ffcb8d 100644 --- a/python/paddle/fluid/tests/unittests/test_pad_op.py +++ b/python/paddle/fluid/tests/unittests/test_pad_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestPadOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_parallel_executor_mnist.py b/python/paddle/fluid/tests/unittests/test_parallel_executor_mnist.py index dfbf9eea510..95fbe6b0160 100644 --- a/python/paddle/fluid/tests/unittests/test_parallel_executor_mnist.py +++ b/python/paddle/fluid/tests/unittests/test_parallel_executor_mnist.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from .parallel_executor_test_base import TestParallelExecutorBase +from parallel_executor_test_base import TestParallelExecutorBase import paddle.fluid as fluid import paddle.fluid.core as core import numpy as np diff --git a/python/paddle/fluid/tests/unittests/test_parallel_executor_seresnext.py b/python/paddle/fluid/tests/unittests/test_parallel_executor_seresnext.py index cabfecf62e8..b04c24b9bd6 100644 --- a/python/paddle/fluid/tests/unittests/test_parallel_executor_seresnext.py +++ b/python/paddle/fluid/tests/unittests/test_parallel_executor_seresnext.py @@ -17,7 +17,7 @@ import paddle.fluid.layers.ops as ops from paddle.fluid.initializer import init_on_cpu from paddle.fluid.layers.learning_rate_scheduler import _decay_step_counter import paddle.fluid.core as core -from .parallel_executor_test_base import TestParallelExecutorBase +from parallel_executor_test_base import TestParallelExecutorBase import unittest import math import os diff --git a/python/paddle/fluid/tests/unittests/test_parallel_executor_transformer.py b/python/paddle/fluid/tests/unittests/test_parallel_executor_transformer.py index 7717de0218d..b6215fddb11 100644 --- a/python/paddle/fluid/tests/unittests/test_parallel_executor_transformer.py +++ b/python/paddle/fluid/tests/unittests/test_parallel_executor_transformer.py @@ -13,9 +13,9 @@ # limitations under the License. import paddle.fluid as fluid -from . import transformer_model +import transformer_model import numpy as np -from .parallel_executor_test_base import TestParallelExecutorBase +from parallel_executor_test_base import TestParallelExecutorBase import unittest import paddle import paddle.dataset.wmt16 as wmt16 diff --git a/python/paddle/fluid/tests/unittests/test_polygon_box_transform.py b/python/paddle/fluid/tests/unittests/test_polygon_box_transform.py index d6e75e4a834..8aff4e87f67 100644 --- a/python/paddle/fluid/tests/unittests/test_polygon_box_transform.py +++ b/python/paddle/fluid/tests/unittests/test_polygon_box_transform.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest def PolygonBoxRestore(input): diff --git a/python/paddle/fluid/tests/unittests/test_pool2d_mkldnn_op.py b/python/paddle/fluid/tests/unittests/test_pool2d_mkldnn_op.py index eba4bc310a4..003ebba18b2 100644 --- a/python/paddle/fluid/tests/unittests/test_pool2d_mkldnn_op.py +++ b/python/paddle/fluid/tests/unittests/test_pool2d_mkldnn_op.py @@ -13,7 +13,7 @@ # limitations under the License. import unittest -from .test_pool2d_op import TestPool2d_Op, TestCase1, TestCase2, TestCase3, TestCase4, TestCase5 +from test_pool2d_op import TestPool2d_Op, TestCase1, TestCase2, TestCase3, TestCase4, TestCase5 class TestMKLDNNCase1(TestPool2d_Op): diff --git a/python/paddle/fluid/tests/unittests/test_pool2d_op.py b/python/paddle/fluid/tests/unittests/test_pool2d_op.py index b66fb7201ba..1cf70311b40 100644 --- a/python/paddle/fluid/tests/unittests/test_pool2d_op.py +++ b/python/paddle/fluid/tests/unittests/test_pool2d_op.py @@ -16,7 +16,7 @@ import unittest import numpy as np import paddle.fluid.core as core -from .op_test import OpTest +from op_test import OpTest def max_pool2D_forward_naive(x, diff --git a/python/paddle/fluid/tests/unittests/test_pool3d_op.py b/python/paddle/fluid/tests/unittests/test_pool3d_op.py index 326da90eeed..92c64b37921 100644 --- a/python/paddle/fluid/tests/unittests/test_pool3d_op.py +++ b/python/paddle/fluid/tests/unittests/test_pool3d_op.py @@ -16,7 +16,7 @@ import unittest import numpy as np import paddle.fluid.core as core -from .op_test import OpTest +from op_test import OpTest def max_pool3D_forward_naive(x, diff --git a/python/paddle/fluid/tests/unittests/test_pool_max_op.py b/python/paddle/fluid/tests/unittests/test_pool_max_op.py index 486c6eb24ad..e6a9f6f08cf 100644 --- a/python/paddle/fluid/tests/unittests/test_pool_max_op.py +++ b/python/paddle/fluid/tests/unittests/test_pool_max_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest def max_pool3D_forward_naive(x, ksize, strides, paddings, global_pool=False): diff --git a/python/paddle/fluid/tests/unittests/test_positive_negative_pair_op.py b/python/paddle/fluid/tests/unittests/test_positive_negative_pair_op.py index 0ce32390de1..8c76393bdac 100644 --- a/python/paddle/fluid/tests/unittests/test_positive_negative_pair_op.py +++ b/python/paddle/fluid/tests/unittests/test_positive_negative_pair_op.py @@ -15,7 +15,7 @@ import unittest import itertools import numpy as np -from .op_test import OpTest +from op_test import OpTest def py_pnpair_op(score, label, query, column=-1, weight=None): diff --git a/python/paddle/fluid/tests/unittests/test_precision_recall_op.py b/python/paddle/fluid/tests/unittests/test_precision_recall_op.py index 3fb231f1077..5ae425fee18 100644 --- a/python/paddle/fluid/tests/unittests/test_precision_recall_op.py +++ b/python/paddle/fluid/tests/unittests/test_precision_recall_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest def calc_precision(tp_count, fp_count): diff --git a/python/paddle/fluid/tests/unittests/test_prelu_op.py b/python/paddle/fluid/tests/unittests/test_prelu_op.py index 1c7e32ee6f5..ae19a553bb8 100644 --- a/python/paddle/fluid/tests/unittests/test_prelu_op.py +++ b/python/paddle/fluid/tests/unittests/test_prelu_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class PReluTest(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_prior_box_op.py b/python/paddle/fluid/tests/unittests/test_prior_box_op.py index 28400b26b11..e15554737b9 100644 --- a/python/paddle/fluid/tests/unittests/test_prior_box_op.py +++ b/python/paddle/fluid/tests/unittests/test_prior_box_op.py @@ -16,7 +16,7 @@ import unittest import numpy as np import sys import math -from .op_test import OpTest +from op_test import OpTest class TestPriorBoxOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_proximal_adagrad_op.py b/python/paddle/fluid/tests/unittests/test_proximal_adagrad_op.py index ddeb2cd6de2..3c268958506 100644 --- a/python/paddle/fluid/tests/unittests/test_proximal_adagrad_op.py +++ b/python/paddle/fluid/tests/unittests/test_proximal_adagrad_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestProximalAdagradOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_proximal_gd_op.py b/python/paddle/fluid/tests/unittests/test_proximal_gd_op.py index 53ad2a921f0..137594b9a08 100644 --- a/python/paddle/fluid/tests/unittests/test_proximal_gd_op.py +++ b/python/paddle/fluid/tests/unittests/test_proximal_gd_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestProximalGDOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_random_crop_op.py b/python/paddle/fluid/tests/unittests/test_random_crop_op.py index 396edbba9f3..1c708d0386d 100644 --- a/python/paddle/fluid/tests/unittests/test_random_crop_op.py +++ b/python/paddle/fluid/tests/unittests/test_random_crop_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np import paddle.fluid.core as core -from .op_test import OpTest +from op_test import OpTest class TestRandomCropOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_rank_loss_op.py b/python/paddle/fluid/tests/unittests/test_rank_loss_op.py index 4e5673e84f8..7eba1e2077e 100644 --- a/python/paddle/fluid/tests/unittests/test_rank_loss_op.py +++ b/python/paddle/fluid/tests/unittests/test_rank_loss_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestRankLossOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_reduce_op.py b/python/paddle/fluid/tests/unittests/test_reduce_op.py index 1d3cc2f88bd..06d116601bf 100644 --- a/python/paddle/fluid/tests/unittests/test_reduce_op.py +++ b/python/paddle/fluid/tests/unittests/test_reduce_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestSumOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_registry.py b/python/paddle/fluid/tests/unittests/test_registry.py index 8ad7908b1fc..a361c4624e3 100644 --- a/python/paddle/fluid/tests/unittests/test_registry.py +++ b/python/paddle/fluid/tests/unittests/test_registry.py @@ -15,7 +15,7 @@ import unittest import paddle.fluid as fluid import numpy as np -from . import decorators +import decorators class TestRegistry(unittest.TestCase): diff --git a/python/paddle/fluid/tests/unittests/test_reshape_op.py b/python/paddle/fluid/tests/unittests/test_reshape_op.py index 43d1eab0684..f51b5a7e990 100644 --- a/python/paddle/fluid/tests/unittests/test_reshape_op.py +++ b/python/paddle/fluid/tests/unittests/test_reshape_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestReshapeOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_reverse_op.py b/python/paddle/fluid/tests/unittests/test_reverse_op.py index e0366717b37..f845575a028 100644 --- a/python/paddle/fluid/tests/unittests/test_reverse_op.py +++ b/python/paddle/fluid/tests/unittests/test_reverse_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestReverseOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_rmsprop_op.py b/python/paddle/fluid/tests/unittests/test_rmsprop_op.py index 4c146f9d4b6..0d84a5853ea 100644 --- a/python/paddle/fluid/tests/unittests/test_rmsprop_op.py +++ b/python/paddle/fluid/tests/unittests/test_rmsprop_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestRmspropOp1(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_roi_pool_op.py b/python/paddle/fluid/tests/unittests/test_roi_pool_op.py index 9e4554a8a4c..df5684ab173 100644 --- a/python/paddle/fluid/tests/unittests/test_roi_pool_op.py +++ b/python/paddle/fluid/tests/unittests/test_roi_pool_op.py @@ -16,7 +16,7 @@ import unittest import numpy as np import math import sys -from .op_test import OpTest +from op_test import OpTest class TestROIPoolOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_row_conv_op.py b/python/paddle/fluid/tests/unittests/test_row_conv_op.py index 66262340a22..07dcd108689 100644 --- a/python/paddle/fluid/tests/unittests/test_row_conv_op.py +++ b/python/paddle/fluid/tests/unittests/test_row_conv_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest def row_conv_forward(x, lod, wt): diff --git a/python/paddle/fluid/tests/unittests/test_rpn_target_assign_op.py b/python/paddle/fluid/tests/unittests/test_rpn_target_assign_op.py index bb9f1a2f366..df6e0faaca6 100644 --- a/python/paddle/fluid/tests/unittests/test_rpn_target_assign_op.py +++ b/python/paddle/fluid/tests/unittests/test_rpn_target_assign_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np import paddle.fluid.core as core -from .op_test import OpTest +from op_test import OpTest def rpn_target_assign(iou, rpn_batch_size_per_im, rpn_positive_overlap, diff --git a/python/paddle/fluid/tests/unittests/test_scale_op.py b/python/paddle/fluid/tests/unittests/test_scale_op.py index 068b96888c1..53f59c39905 100644 --- a/python/paddle/fluid/tests/unittests/test_scale_op.py +++ b/python/paddle/fluid/tests/unittests/test_scale_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestScaleOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_scatter_op.py b/python/paddle/fluid/tests/unittests/test_scatter_op.py index 4ea10950182..fb172874363 100644 --- a/python/paddle/fluid/tests/unittests/test_scatter_op.py +++ b/python/paddle/fluid/tests/unittests/test_scatter_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestScatterOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_seq_concat_op.py b/python/paddle/fluid/tests/unittests/test_seq_concat_op.py index d89447d5fe2..11ffa761a69 100644 --- a/python/paddle/fluid/tests/unittests/test_seq_concat_op.py +++ b/python/paddle/fluid/tests/unittests/test_seq_concat_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np import sys -from .op_test import OpTest +from op_test import OpTest def to_abs_offset_lod(lod): diff --git a/python/paddle/fluid/tests/unittests/test_seq_conv.py b/python/paddle/fluid/tests/unittests/test_seq_conv.py index 838f1a5eba1..1a6e1aad799 100644 --- a/python/paddle/fluid/tests/unittests/test_seq_conv.py +++ b/python/paddle/fluid/tests/unittests/test_seq_conv.py @@ -15,7 +15,7 @@ import unittest import numpy as np import random -from .op_test import OpTest +from op_test import OpTest class TestSeqProject(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_seq_pool.py b/python/paddle/fluid/tests/unittests/test_seq_pool.py index 92e08b92b64..0b3659d7a67 100644 --- a/python/paddle/fluid/tests/unittests/test_seq_pool.py +++ b/python/paddle/fluid/tests/unittests/test_seq_pool.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestSeqAvgPool(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_sequence_erase_op.py b/python/paddle/fluid/tests/unittests/test_sequence_erase_op.py index b567534cc8d..8f0765277ae 100644 --- a/python/paddle/fluid/tests/unittests/test_sequence_erase_op.py +++ b/python/paddle/fluid/tests/unittests/test_sequence_erase_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest def sequence_erase(in_seq, lod0, tokens): diff --git a/python/paddle/fluid/tests/unittests/test_sequence_expand.py b/python/paddle/fluid/tests/unittests/test_sequence_expand.py index 51a8392b85a..5ff0dab23e5 100644 --- a/python/paddle/fluid/tests/unittests/test_sequence_expand.py +++ b/python/paddle/fluid/tests/unittests/test_sequence_expand.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestSequenceExpand(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_sequence_reshape.py b/python/paddle/fluid/tests/unittests/test_sequence_reshape.py index 6aacd4f83f2..39b02ecf6dd 100644 --- a/python/paddle/fluid/tests/unittests/test_sequence_reshape.py +++ b/python/paddle/fluid/tests/unittests/test_sequence_reshape.py @@ -15,7 +15,7 @@ import unittest import numpy as np import math -from .op_test import OpTest +from op_test import OpTest class TestSequenceReshape(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_sequence_slice_op.py b/python/paddle/fluid/tests/unittests/test_sequence_slice_op.py index 8204153b532..313e485d1e3 100644 --- a/python/paddle/fluid/tests/unittests/test_sequence_slice_op.py +++ b/python/paddle/fluid/tests/unittests/test_sequence_slice_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np import sys -from .op_test import OpTest +from op_test import OpTest class TestSequenceSliceOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_sequence_softmax_op.py b/python/paddle/fluid/tests/unittests/test_sequence_softmax_op.py index 4134a5d4074..c4fc8b74cf8 100644 --- a/python/paddle/fluid/tests/unittests/test_sequence_softmax_op.py +++ b/python/paddle/fluid/tests/unittests/test_sequence_softmax_op.py @@ -14,8 +14,8 @@ import unittest import numpy as np -from .op_test import OpTest -from .test_softmax_op import stable_softmax +from op_test import OpTest +from test_softmax_op import stable_softmax import paddle.fluid.core as core diff --git a/python/paddle/fluid/tests/unittests/test_sgd_op.py b/python/paddle/fluid/tests/unittests/test_sgd_op.py index d3e067e67c9..3126293f9d8 100644 --- a/python/paddle/fluid/tests/unittests/test_sgd_op.py +++ b/python/paddle/fluid/tests/unittests/test_sgd_op.py @@ -16,7 +16,7 @@ import unittest import numpy as np import paddle.fluid.core as core from paddle.fluid.op import Operator -from .op_test import OpTest +from op_test import OpTest class TestSGDOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_shape_op.py b/python/paddle/fluid/tests/unittests/test_shape_op.py index 28677e0a4f7..a62ee050075 100644 --- a/python/paddle/fluid/tests/unittests/test_shape_op.py +++ b/python/paddle/fluid/tests/unittests/test_shape_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestShapeOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_sigmoid_cross_entropy_with_logits_op.py b/python/paddle/fluid/tests/unittests/test_sigmoid_cross_entropy_with_logits_op.py index f74529b4d68..c435796569c 100644 --- a/python/paddle/fluid/tests/unittests/test_sigmoid_cross_entropy_with_logits_op.py +++ b/python/paddle/fluid/tests/unittests/test_sigmoid_cross_entropy_with_logits_op.py @@ -13,7 +13,7 @@ # limitations under the License. import numpy as np -from .op_test import OpTest +from op_test import OpTest from scipy.special import logit from scipy.special import expit import unittest diff --git a/python/paddle/fluid/tests/unittests/test_sign_op.py b/python/paddle/fluid/tests/unittests/test_sign_op.py index 2909c4520ab..087a0c575bf 100644 --- a/python/paddle/fluid/tests/unittests/test_sign_op.py +++ b/python/paddle/fluid/tests/unittests/test_sign_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestSignOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_slice_op.py b/python/paddle/fluid/tests/unittests/test_slice_op.py index eaf33d9f0de..1a48bce3bb7 100644 --- a/python/paddle/fluid/tests/unittests/test_slice_op.py +++ b/python/paddle/fluid/tests/unittests/test_slice_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestSliceOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_smooth_l1_loss_op.py b/python/paddle/fluid/tests/unittests/test_smooth_l1_loss_op.py index 9c53a699410..e74664dac4d 100644 --- a/python/paddle/fluid/tests/unittests/test_smooth_l1_loss_op.py +++ b/python/paddle/fluid/tests/unittests/test_smooth_l1_loss_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest def smooth_l1_loss_forward(val, sigma2): diff --git a/python/paddle/fluid/tests/unittests/test_softmax_op.py b/python/paddle/fluid/tests/unittests/test_softmax_op.py index e42f9a705c7..0ab581cfb0e 100644 --- a/python/paddle/fluid/tests/unittests/test_softmax_op.py +++ b/python/paddle/fluid/tests/unittests/test_softmax_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest import paddle.fluid.core as core diff --git a/python/paddle/fluid/tests/unittests/test_softmax_with_cross_entropy_op.py b/python/paddle/fluid/tests/unittests/test_softmax_with_cross_entropy_op.py index 97f5c4f8df5..c0d9fc8f22a 100644 --- a/python/paddle/fluid/tests/unittests/test_softmax_with_cross_entropy_op.py +++ b/python/paddle/fluid/tests/unittests/test_softmax_with_cross_entropy_op.py @@ -15,8 +15,8 @@ import unittest import numpy as np -from .op_test import OpTest -from .test_softmax_op import stable_softmax +from op_test import OpTest +from test_softmax_op import stable_softmax class TestSoftmaxWithCrossEntropyOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_split_ids_op.py b/python/paddle/fluid/tests/unittests/test_split_ids_op.py index fdc9d90cef0..e9f0a06a56b 100644 --- a/python/paddle/fluid/tests/unittests/test_split_ids_op.py +++ b/python/paddle/fluid/tests/unittests/test_split_ids_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestSplitIdsOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_split_op.py b/python/paddle/fluid/tests/unittests/test_split_op.py index 919020a9fbd..6b67a52e81b 100644 --- a/python/paddle/fluid/tests/unittests/test_split_op.py +++ b/python/paddle/fluid/tests/unittests/test_split_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestSplitOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_spp_op.py b/python/paddle/fluid/tests/unittests/test_spp_op.py index efd7f2e1bb4..3cbfc2a703f 100644 --- a/python/paddle/fluid/tests/unittests/test_spp_op.py +++ b/python/paddle/fluid/tests/unittests/test_spp_op.py @@ -14,9 +14,9 @@ import unittest import numpy as np -from .op_test import OpTest -from .test_pool2d_op import max_pool2D_forward_naive -from .test_pool2d_op import avg_pool2D_forward_naive +from op_test import OpTest +from test_pool2d_op import max_pool2D_forward_naive +from test_pool2d_op import avg_pool2D_forward_naive class TestSppOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_squared_l2_distance_op.py b/python/paddle/fluid/tests/unittests/test_squared_l2_distance_op.py index 1edd243c928..78bc300ebec 100644 --- a/python/paddle/fluid/tests/unittests/test_squared_l2_distance_op.py +++ b/python/paddle/fluid/tests/unittests/test_squared_l2_distance_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestSquaredL2DistanceOp_f0(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_squared_l2_norm_op.py b/python/paddle/fluid/tests/unittests/test_squared_l2_norm_op.py index e174d1f86be..609445d5228 100644 --- a/python/paddle/fluid/tests/unittests/test_squared_l2_norm_op.py +++ b/python/paddle/fluid/tests/unittests/test_squared_l2_norm_op.py @@ -15,7 +15,7 @@ import numpy as np import unittest from numpy import linalg as LA -from .op_test import OpTest +from op_test import OpTest class TestL2LossOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_squeeze_op.py b/python/paddle/fluid/tests/unittests/test_squeeze_op.py index 725ebdc0642..bca6af2fd5d 100644 --- a/python/paddle/fluid/tests/unittests/test_squeeze_op.py +++ b/python/paddle/fluid/tests/unittests/test_squeeze_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest # Correct: General. diff --git a/python/paddle/fluid/tests/unittests/test_sum_mkldnn_op.py b/python/paddle/fluid/tests/unittests/test_sum_mkldnn_op.py index 9984638c1b5..7956897d68a 100644 --- a/python/paddle/fluid/tests/unittests/test_sum_mkldnn_op.py +++ b/python/paddle/fluid/tests/unittests/test_sum_mkldnn_op.py @@ -14,7 +14,7 @@ import unittest -from .test_sum_op import TestSumOp +from test_sum_op import TestSumOp class TestMKLDNN(TestSumOp): diff --git a/python/paddle/fluid/tests/unittests/test_sum_op.py b/python/paddle/fluid/tests/unittests/test_sum_op.py index d1798075b3c..1d90414e137 100644 --- a/python/paddle/fluid/tests/unittests/test_sum_op.py +++ b/python/paddle/fluid/tests/unittests/test_sum_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestSumOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_target_assign_op.py b/python/paddle/fluid/tests/unittests/test_target_assign_op.py index 67cf60a80b0..bd208897520 100644 --- a/python/paddle/fluid/tests/unittests/test_target_assign_op.py +++ b/python/paddle/fluid/tests/unittests/test_target_assign_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np import random -from .op_test import OpTest +from op_test import OpTest def gen_match_and_neg_indices(num_prior, gt_lod, neg_lod): diff --git a/python/paddle/fluid/tests/unittests/test_top_k_op.py b/python/paddle/fluid/tests/unittests/test_top_k_op.py index eca8cbd7a35..cbc3da55030 100644 --- a/python/paddle/fluid/tests/unittests/test_top_k_op.py +++ b/python/paddle/fluid/tests/unittests/test_top_k_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestTopkOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_transpose_op.py b/python/paddle/fluid/tests/unittests/test_transpose_op.py index dc4ddecaaf1..ebd63fbd495 100644 --- a/python/paddle/fluid/tests/unittests/test_transpose_op.py +++ b/python/paddle/fluid/tests/unittests/test_transpose_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestTransposeOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_uniform_random_batch_size_like_op.py b/python/paddle/fluid/tests/unittests/test_uniform_random_batch_size_like_op.py index a40129e74ef..e033e86114f 100644 --- a/python/paddle/fluid/tests/unittests/test_uniform_random_batch_size_like_op.py +++ b/python/paddle/fluid/tests/unittests/test_uniform_random_batch_size_like_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest class TestUniformRandomBatchSizeLike(OpTest): diff --git a/python/paddle/fluid/tests/unittests/test_uniform_random_op.py b/python/paddle/fluid/tests/unittests/test_uniform_random_op.py index 80eb90e98ef..346a949b6e7 100644 --- a/python/paddle/fluid/tests/unittests/test_uniform_random_op.py +++ b/python/paddle/fluid/tests/unittests/test_uniform_random_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest import paddle.fluid.core as core from paddle.fluid.op import Operator diff --git a/python/paddle/fluid/tests/unittests/test_unpool_op.py b/python/paddle/fluid/tests/unittests/test_unpool_op.py index 1c9ca00cdb3..ecce4cdde2d 100644 --- a/python/paddle/fluid/tests/unittests/test_unpool_op.py +++ b/python/paddle/fluid/tests/unittests/test_unpool_op.py @@ -14,7 +14,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest def unpool2dmax_forward_naive(input, indices, ksize, strides, paddings): diff --git a/python/paddle/fluid/tests/unittests/test_unsqueeze_op.py b/python/paddle/fluid/tests/unittests/test_unsqueeze_op.py index f0ab1e8f84b..7a4aa0a40b5 100644 --- a/python/paddle/fluid/tests/unittests/test_unsqueeze_op.py +++ b/python/paddle/fluid/tests/unittests/test_unsqueeze_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from .op_test import OpTest +from op_test import OpTest # Correct: General. diff --git a/python/paddle/fluid/tests/unittests/test_warpctc_op.py b/python/paddle/fluid/tests/unittests/test_warpctc_op.py index 3e1d99df7fa..9f1aaee472f 100644 --- a/python/paddle/fluid/tests/unittests/test_warpctc_op.py +++ b/python/paddle/fluid/tests/unittests/test_warpctc_op.py @@ -15,8 +15,8 @@ import sys import unittest import numpy as np -from .op_test import OpTest -from .test_softmax_op import stable_softmax +from op_test import OpTest +from test_softmax_op import stable_softmax CUDA_BLOCK_SIZE = 512 -- GitLab