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
1 change: 0 additions & 1 deletion test/legacy_test/test_isfinite_v2_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,6 @@ def test_neginf(self):


class TestError(unittest.TestCase):

def test_bad_input(self):
paddle.enable_static()
with paddle.static.program_guard(paddle.static.Program()):
Expand Down
2 changes: 0 additions & 2 deletions test/legacy_test/test_jit_save_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,6 @@ def dfs(obj1, obj2):


class TestSaveLoadWithDictInput(unittest.TestCase):

def test_dict_input(self):
# NOTE: This net cannot be executed, it is just
# a special case for exporting models in model validation
Expand Down Expand Up @@ -765,7 +764,6 @@ def test_dict_input(self):


class TestSaveLoadWithDictInputNoPrune(unittest.TestCase):

def test_dict_input(self):
net = LinearNetWithDictInputNoPrune(8, 8)
temp_dir = tempfile.TemporaryDirectory()
Expand Down
2 changes: 0 additions & 2 deletions test/legacy_test/test_l1_loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ def test_gpu(self):

# test case the raise message
def test_errors(self):

def test_value_error():
input = paddle.static.data(
name='input', shape=[10, 10, 5], dtype='float32'
Expand Down Expand Up @@ -194,7 +193,6 @@ def test_gpu(self):

# test case the raise message
def test_errors(self):

def test_value_error():
loss = paddle.nn.loss.L1Loss(reduction="reduce_mean")

Expand Down
1 change: 0 additions & 1 deletion test/legacy_test/test_lambv2_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ def test_lamb_op(self):


class TestLambOpWithCombinedOp(unittest.TestCase):

def test_lamb_op_with_multi_steps(self):
paddle.enable_static()

Expand Down
1 change: 0 additions & 1 deletion test/legacy_test/test_layerlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

class TestLayerListEmptyInsert(unittest.TestCase):
def test_insert_empty_list(self):

# Test successful case - insert at index 0
layers = paddle.nn.LayerList()
linear = paddle.nn.Linear(10, 10)
Expand Down
4 changes: 0 additions & 4 deletions test/legacy_test/test_linalg_cond.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ def gen_empty_input():


class API_TestStaticCond(unittest.TestCase):

def test_out(self):
paddle.enable_static()
# test calling results of 'cond' in static graph mode
Expand All @@ -92,7 +91,6 @@ def test_out(self):


class API_TestDygraphCond(unittest.TestCase):

def test_out(self):
paddle.disable_static()
# test calling results of 'cond' in dynamic mode
Expand All @@ -102,7 +100,6 @@ def test_out(self):


class TestCondAPIError(unittest.TestCase):

def test_dygraph_api_error(self):
paddle.disable_static()
# test raising errors when 'cond' is called in dygraph mode
Expand Down Expand Up @@ -154,7 +151,6 @@ def test_static_empty_input_error(self):


class TestCondEmptyTensorInput(unittest.TestCase):

def test_dygraph_empty_tensor_input(self):
paddle.disable_static()
# test calling results of 'cond' when input is an empty tensor in dynamic mode
Expand Down
1 change: 0 additions & 1 deletion test/legacy_test/test_linear_interp_v2_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,6 @@ def init_test_case(self):


class TestLinearInterpOpError(unittest.TestCase):

def test_error(self):
with (
paddle_static_guard(),
Expand Down
2 changes: 0 additions & 2 deletions test/legacy_test/test_log_normal.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ def set_attrs(self):


class TestLogNormalAlias(unittest.TestCase):

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


class TestLogNormalErrors(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_logspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ def init_data(self):


class TestLogspaceAPI(unittest.TestCase):

def test_variable_input1(self):
paddle.enable_static()
prog = paddle.static.Program()
Expand Down
1 change: 0 additions & 1 deletion test/legacy_test/test_lookahead.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@


class TestLookAhead(unittest.TestCase):

def test_lookahead_static(self):
paddle.enable_static()
place = base.CPUPlace()
Expand Down
1 change: 0 additions & 1 deletion test/legacy_test/test_lookup_table_v2_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@


class TestStaticGraphSupportMultipleInt(unittest.TestCase):

def test_main(self):
dtypes = ['uint8', 'int8', 'int16', 'int32', 'int64']
if paddle.in_dynamic_mode():
Expand Down
1 change: 0 additions & 1 deletion test/legacy_test/test_lrn_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ def test_dygraph(self):


class TestLocalResponseNormFAPIError(unittest.TestCase):

def test_errors(self):
with (
paddle_static_guard(),
Expand Down
1 change: 0 additions & 1 deletion test/legacy_test/test_matrix_nms_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,6 @@ def set_argument(self):


class TestMatrixNMSError(unittest.TestCase):

def test_errors(self):
M = 1200
N = 7
Expand Down
1 change: 0 additions & 1 deletion test/legacy_test/test_matrix_power_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,6 @@ def test_dygraph(self):


class TestMatrixPowerAPIError(unittest.TestCase):

def test_errors(self):
input_np = np.random.random([4, 4]).astype("float64")

Expand Down
1 change: 0 additions & 1 deletion test/legacy_test/test_matrix_rank_atol_rtol_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,6 @@ def test_errors(self):


class TestMatrixRankAtolRtolZeroSizeTensor(unittest.TestCase):

def _get_places(self):
return get_places()

Expand Down
1 change: 0 additions & 1 deletion test/legacy_test/test_matrix_rank_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,6 @@ def test_static(self):


class TestMatrixRankZeroSizeTensor(unittest.TestCase):

def _get_places(self):
return get_places()

Expand Down
1 change: 0 additions & 1 deletion test/legacy_test/test_median.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,6 @@ def test_median_dygraph(self):


class TestMedianMin_ZeroSize(unittest.TestCase):

def dygraph_single_test_median(self, lis_test):
x, axis, keepdims = lis_test
res_np = np_median_min_axis(x, axis=axis, keepdims=keepdims)
Expand Down
4 changes: 0 additions & 4 deletions test/legacy_test/test_meshgrid_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ def test_check_grad(self):


class TestMeshgridOp3(unittest.TestCase):

def test_api(self):
input_1 = np.random.randint(
0,
Expand Down Expand Up @@ -208,7 +207,6 @@ def test_api(self):


class TestMeshgridOp4(unittest.TestCase):

def test_list_input(self):
input_1 = np.random.randint(
0,
Expand Down Expand Up @@ -246,7 +244,6 @@ def test_list_input(self):


class TestMeshgridOp5(unittest.TestCase):

def test_tuple_input(self):
input_1 = np.random.randint(
0,
Expand Down Expand Up @@ -362,7 +359,6 @@ def test_api_with_dygraph_tuple_input(self):


class TestMeshgridOpComplexStatic(unittest.TestCase):

def test_tuple_input(self):
input_1 = np.random.randint(
0,
Expand Down
1 change: 0 additions & 1 deletion test/legacy_test/test_modelaverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def get_value_by_name(name, ops):


class TestModelAverage(unittest.TestCase):

def test_model_average_static(self):
paddle.enable_static()
place = base.CPUPlace()
Expand Down
5 changes: 0 additions & 5 deletions test/legacy_test/test_mse_loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@


class TestMseLoss(unittest.TestCase):

def test_mse_loss(self):
input_val = np.random.uniform(0.1, 0.5, (2, 3)).astype("float32")
label_val = np.random.uniform(0.1, 0.5, (2, 3)).astype("float32")
Expand Down Expand Up @@ -61,7 +60,6 @@ def test_mse_loss(self):


class TestMseInvalidInput(unittest.TestCase):

def test_error(self):
def test_invalid_input():
input = [256, 3]
Expand Down Expand Up @@ -91,7 +89,6 @@ def test_invalid_tuple_input():


class TestNNMseLoss(unittest.TestCase):

def test_NNMseLoss_mean(self):
for dim in [[10, 10], [2, 10, 10], [3, 3, 10, 10]]:
input_np = np.random.uniform(0.1, 0.5, dim).astype("float32")
Expand Down Expand Up @@ -214,7 +211,6 @@ def test_NNMseLoss_none(self):


class TestNNFunctionalMseLoss(unittest.TestCase):

def test_NNFunctionalMseLoss_mean(self):
for dim in [[10, 10], [2, 10, 10], [3, 3, 10, 10]]:
input_np = np.random.uniform(0.1, 0.5, dim).astype("float32")
Expand Down Expand Up @@ -331,7 +327,6 @@ def test_NNFunctionalMseLoss_none(self):


class TestNNFunctionalMseLoss_ZeroSize(unittest.TestCase):

def test_dygraph_and_grad(self):
for dim in [[0, 0], [2, 0, 10]]:
input_np = np.random.uniform(0.1, 0.5, dim).astype("float32")
Expand Down
Loading