提交 9fc13fde 编写于 作者: M minqiyang

Remove python3 relative import of unittest

上级 35e6abd7
......@@ -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):
......
......@@ -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.
......
......@@ -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
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestAccuracyOp(OpTest):
......
......@@ -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):
......
......@@ -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
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestAdadeltaOp1(OpTest):
......
......@@ -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
......
......@@ -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
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestAdamaxOp1(OpTest):
......
......@@ -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,
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class BaseTestCase(OpTest):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestArgsortOp(OpTest):
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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):
......
......@@ -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
......
......@@ -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
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestBilinearTensorProductOp(OpTest):
......
......@@ -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):
......
......@@ -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,
......
......@@ -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
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class Segment(object):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestClipByNormOp(OpTest):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestClipOp(OpTest):
......
......@@ -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
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestConcatOp(OpTest):
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestCosSimOp(OpTest):
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestSumOp1(OpTest):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestDecayedAdagradOp1(OpTest):
......
......@@ -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):
......
......@@ -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):
......
......@@ -17,7 +17,7 @@ import random
import collections
import paddle.fluid as fluid
import unittest
from .decorators import *
from decorators import *
class Memory(object):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
def Levenshtein(hyp, ref):
......
......@@ -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.
......
......@@ -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):
......
......@@ -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):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestElementwiseOp(OpTest):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestElementwiseOp(OpTest):
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestExpandOpRank1(OpTest):
......
......@@ -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):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestFakeQuantizeOp(OpTest):
......
......@@ -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):
......
......@@ -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
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestFillConstantBatchSizeLikeWhenFirstDimIsBatchSize(OpTest):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestFillConstantOp1(OpTest):
......
......@@ -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
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestFillZerosLikeOp(OpTest):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestFTRLOp(OpTest):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestGatherOp(OpTest):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestGaussianRandomBatchSizeLike(OpTest):
......
......@@ -14,7 +14,7 @@
import unittest
from .test_gaussian_random_op import TestGaussianRandomOp
from test_gaussian_random_op import TestGaussianRandomOp
class TestMKLDNN(TestGaussianRandomOp):
......
......@@ -14,7 +14,7 @@
import paddle.fluid as fluid
from paddle.fluid.layers.device import get_places
from . import decorators
import decorators
import unittest
......
......@@ -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):
......
......@@ -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):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestHingeLossOp(OpTest):
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestEmpty(OpTest):
......
......@@ -14,7 +14,7 @@
import numpy as np
import unittest
from .op_test import OpTest
from op_test import OpTest
class TestL1NormOp(OpTest):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestLabelSmoothOp(OpTest):
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestLodResetOpByAttr(OpTest):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestLogLossOp(OpTest):
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestLRNOp(OpTest):
......
......@@ -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
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
def sigmoid_np(x):
......
......@@ -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,
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestMarginRankLossOp(OpTest):
......
......@@ -13,7 +13,7 @@
# limitations under the License.
import unittest
from . import decorators
import decorators
import paddle.fluid as fluid
import numpy
......
......@@ -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):
......
......@@ -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):
......
......@@ -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,
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestMeanOp(OpTest):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestMergeIdsOp(OpTest):
......
......@@ -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):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestMinusOp(OpTest):
......
......@@ -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):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestMomentumOp1(OpTest):
......
......@@ -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):
......
......@@ -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):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestMultiplexOp(OpTest):
......
......@@ -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,
......
......@@ -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):
......
......@@ -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
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestPadOp(OpTest):
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
def PolygonBoxRestore(input):
......
......@@ -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):
......
......@@ -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,
......
......@@ -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,
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class PReluTest(OpTest):
......
......@@ -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):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestProximalAdagradOp(OpTest):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestProximalGDOp(OpTest):
......
......@@ -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):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestRankLossOp(OpTest):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestSumOp(OpTest):
......
......@@ -15,7 +15,7 @@ import unittest
import paddle.fluid as fluid
import numpy as np
from . import decorators
import decorators
class TestRegistry(unittest.TestCase):
......
......@@ -15,7 +15,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestReshapeOp(OpTest):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestReverseOp(OpTest):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestRmspropOp1(OpTest):
......
......@@ -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):
......
......@@ -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):
......
......@@ -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,
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestScaleOp(OpTest):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestScatterOp(OpTest):
......
......@@ -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):
......
......@@ -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):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestSeqAvgPool(OpTest):
......
......@@ -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):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestSequenceExpand(OpTest):
......
......@@ -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):
......
......@@ -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):
......
......@@ -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
......
......@@ -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):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestShapeOp(OpTest):
......
......@@ -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
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestSignOp(OpTest):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestSliceOp(OpTest):
......
......@@ -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):
......
......@@ -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
......
......@@ -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):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestSplitIdsOp(OpTest):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestSplitOp(OpTest):
......
......@@ -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):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestSquaredL2DistanceOp_f0(OpTest):
......
......@@ -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):
......
......@@ -15,7 +15,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
# Correct: General.
......
......@@ -14,7 +14,7 @@
import unittest
from .test_sum_op import TestSumOp
from test_sum_op import TestSumOp
class TestMKLDNN(TestSumOp):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestSumOp(OpTest):
......
......@@ -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):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestTopkOp(OpTest):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestTransposeOp(OpTest):
......
......@@ -14,7 +14,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
class TestUniformRandomBatchSizeLike(OpTest):
......
......@@ -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
......
......@@ -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):
......
......@@ -15,7 +15,7 @@
import unittest
import numpy as np
from .op_test import OpTest
from op_test import OpTest
# Correct: General.
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册