Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions test/legacy_test/test_multi_dot_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,6 @@ def get_inputs_and_outputs(self):

# python API test
class TestMultiDotOpError(unittest.TestCase):

def test_errors(self):
with paddle.static.program_guard(
paddle.static.Program(), paddle.static.Program()
Expand Down Expand Up @@ -335,7 +334,6 @@ def test_errors(self):


class APITestMultiDot(unittest.TestCase):

def test_out(self):
paddle.enable_static()
with paddle.static.program_guard(paddle.static.Program()):
Expand Down
1 change: 0 additions & 1 deletion test/legacy_test/test_multi_label_soft_margin_loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ def LogSigmoid(x):


class TestMultiLabelMarginLoss(unittest.TestCase):

def test_MultiLabelSoftMarginLoss(self):
input = np.random.uniform(0.1, 0.8, size=(5, 5)).astype(np.float64)
label = np.random.randint(0, 2, size=(5, 5)).astype(np.float64)
Expand Down
1 change: 0 additions & 1 deletion test/legacy_test/test_multilabelmarginloss.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ def calc_multi_label_margin_loss(


class TestMultiLabelMarginLoss(unittest.TestCase):

def test_MultiLabelMarginLoss(self):
batch_size = 5
num_classes = 4
Expand Down
1 change: 0 additions & 1 deletion test/legacy_test/test_multimarginloss.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ def calc_multi_margin_loss(


class TestMultiMarginLoss(unittest.TestCase):

def test_MultiMarginLoss(self):
batch_size = 5
num_classes = 2
Expand Down
1 change: 0 additions & 1 deletion test/legacy_test/test_multiplex_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ def init_dtype(self):


class TestMultiplexOpError(unittest.TestCase):

def test_errors(self):
paddle.enable_static()
with base.program_guard(base.Program(), base.Program()):
Expand Down
1 change: 0 additions & 1 deletion test/legacy_test/test_multiply.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ def multiply_shape_error():


class TestMultiplyApiZeroSize(TestMultiplyApi):

# only support the 0 size tensor
def _test_grad(self, x_data, y_data):
paddle.disable_static()
Expand Down
1 change: 0 additions & 1 deletion test/legacy_test/test_mv_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ def test_static_graph(self):


class TestMVError(unittest.TestCase):

def test_input(self):
def test_shape():
paddle.enable_static()
Expand Down
2 changes: 0 additions & 2 deletions test/legacy_test/test_nansum_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@


class API_Test_Nansum(unittest.TestCase):

def test_static_graph(self):
paddle.enable_static()
startup_program = paddle.static.Program()
Expand Down Expand Up @@ -146,7 +145,6 @@ def test_dygraph(self):


class API_Test_Nansum_ZeroSize(unittest.TestCase):

def test_dygraph(self):
x = np.random.random([2, 0, 3]).astype(np.float32)
with base.dygraph.guard():
Expand Down
1 change: 0 additions & 1 deletion test/legacy_test/test_negative.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@


class TestNegativeApi(unittest.TestCase):

def setUp(self):
paddle.disable_static()
self.shape = [2, 3, 4, 5]
Expand Down
1 change: 0 additions & 1 deletion test/legacy_test/test_nll_loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -1183,7 +1183,6 @@ def test_name(self):


class TestNLLLossInvalidArgs(unittest.TestCase):

def test_x_dim_value_error(self):
def test_x_dim_lt_2():
# place = paddle.CPUPlace()
Expand Down
1 change: 0 additions & 1 deletion test/legacy_test/test_nn_functional_hot_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ def test_check_output(self):


class TestOneHotOpApi(unittest.TestCase):

def test_api(self):
main = paddle.static.Program()
startup = paddle.static.Program()
Expand Down
8 changes: 0 additions & 8 deletions test/legacy_test/test_nn_grad.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@


class TestSliceOpDoubleGradCheck(unittest.TestCase):

@prog_scope()
def func(self, place):
self.config()
Expand Down Expand Up @@ -65,7 +64,6 @@ def config(self):


class TestReduceMeanWithDimDoubleGradCheck(unittest.TestCase):

@prog_scope()
def func(self, place):
shape = [7, 11]
Expand All @@ -87,7 +85,6 @@ def test_grad(self):


class TestReduceSumWithDimDoubleGradCheck(unittest.TestCase):

@prog_scope()
def func(self, place):
shape = [7, 11]
Expand All @@ -109,7 +106,6 @@ def test_grad(self):


class TestReshapeDoubleGradCheck(unittest.TestCase):

@prog_scope()
def func(self, place):
x_shape = [3, 12]
Expand Down Expand Up @@ -270,7 +266,6 @@ def test_grad(self):


class TestTransposeDoubleGradCheck(unittest.TestCase):

@prog_scope()
def func(self, place):
x_shape = [3, 40]
Expand All @@ -290,7 +285,6 @@ def test_grad(self):


class TestTransposeDoubleGradCheckCase1(unittest.TestCase):

@prog_scope()
def func(self, place):
x_shape = [2, 3, 4, 5]
Expand Down Expand Up @@ -340,7 +334,6 @@ def test_grad(self):


class TestConstantPadDoubleGradCheckCase1(TestConstantPadDoubleGradCheck):

@prog_scope()
def func(self, place):
x_shape = [2, 3, 4, 5]
Expand Down Expand Up @@ -470,7 +463,6 @@ def test_grad(self):


class TestAvgPool2DDoubleGradCheckCase1(unittest.TestCase):

@prog_scope()
def func(self, place):
input_NCHW = paddle.static.data(
Expand Down
2 changes: 0 additions & 2 deletions test/legacy_test/test_nonzero_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ def return_outputs(self):


class TestZeroSizeOp(TestNonzeroOp):

def init_shape(self):
self.shape = [0, 10]

Expand All @@ -219,7 +218,6 @@ def init_dtype(self):


class TestZeroSizeOpCase2(TestNonzeroOp):

def init_shape(self):
self.shape = [0, 10]

Expand Down
3 changes: 0 additions & 3 deletions test/legacy_test/test_normal.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ def set_attrs(self):


class TestNormalAlias(unittest.TestCase):

def test_alias(self):
paddle.disable_static()
shape = [1, 2, 3]
Expand All @@ -197,7 +196,6 @@ def test_alias(self):


class TestNormalErrors(unittest.TestCase):

def test_errors(self):
main_program = paddle.static.Program()
with paddle.static.program_guard(main_program):
Expand Down Expand Up @@ -402,7 +400,6 @@ def set_attrs(self):


class TestNormalComplexErrors(unittest.TestCase):

def test_errors(self):
main_program = paddle.static.Program()
with paddle.static.program_guard(main_program):
Expand Down
1 change: 0 additions & 1 deletion test/legacy_test/test_npair_loss_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ def test_npair_loss(self):


class TestNpairLossOpError(unittest.TestCase):

def test_errors(self):
with paddle.static.program_guard(
paddle.static.Program(), paddle.static.Program()
Expand Down
1 change: 0 additions & 1 deletion test/legacy_test/test_numel_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ def init(self):


class TestNumelAPI(unittest.TestCase):

def test_numel_static(self):
main_program = paddle.static.Program()
startup_program = paddle.static.Program()
Expand Down
1 change: 0 additions & 1 deletion test/legacy_test/test_one_hot_v2_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ def test_check_output(self):


class TestOneHotOpApi(unittest.TestCase):

def test_api(self):
main = paddle.static.Program()
startup = paddle.static.Program()
Expand Down
1 change: 0 additions & 1 deletion test/legacy_test/test_op_name_conflict.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@


class TestOpNameConflict(unittest.TestCase):

def test_conflict(self):
paddle.enable_static()
main = base.Program()
Expand Down
1 change: 0 additions & 1 deletion test/legacy_test/test_outer.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ def test_multiply_dynamic(self):


class TestMultiplyError(unittest.TestCase):

def test_errors_static(self):
# test static computation graph: dtype can not be int8
paddle.enable_static()
Expand Down
2 changes: 0 additions & 2 deletions test/legacy_test/test_pad_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ def test_check_grad_normal(self):


class TestPadOpError(unittest.TestCase):

def test_errors(self):
with (
static_guard(),
Expand Down Expand Up @@ -274,7 +273,6 @@ def call_func(self, x):


class TestPaddingValueTensor3(unittest.TestCase):

def test_static(self):
with static_guard():
np_x = np.random.random((16, 16)).astype("float32")
Expand Down
Loading