Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
a20f7648
P
Paddle
项目概览
机器未来
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
a20f7648
编写于
10月 11, 2022
作者:
N
Nyakku Shigure
提交者:
GitHub
10月 11, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[CodeStyle][F401] remove unused import in unittests/test_[p-t] (#46705)
上级
2c407ef0
变更
131
展开全部
隐藏空白更改
内联
并排
Showing
131 changed file
with
19 addition
and
250 deletion
+19
-250
python/paddle/fluid/tests/unittests/test_paddle_imperative_double_grad.py
...uid/tests/unittests/test_paddle_imperative_double_grad.py
+0
-1
python/paddle/fluid/tests/unittests/test_paddle_multiprocessing.py
...ddle/fluid/tests/unittests/test_paddle_multiprocessing.py
+1
-2
python/paddle/fluid/tests/unittests/test_paddle_save_load_binary.py
...dle/fluid/tests/unittests/test_paddle_save_load_binary.py
+0
-5
python/paddle/fluid/tests/unittests/test_parallel_dygraph_dataparallel.py
...uid/tests/unittests/test_parallel_dygraph_dataparallel.py
+0
-2
python/paddle/fluid/tests/unittests/test_parallel_dygraph_dataparallel_cpuonly.py
...s/unittests/test_parallel_dygraph_dataparallel_cpuonly.py
+0
-2
python/paddle/fluid/tests/unittests/test_parallel_dygraph_sparse_embedding_diff_length_gloo.py
...est_parallel_dygraph_sparse_embedding_diff_length_gloo.py
+0
-5
python/paddle/fluid/tests/unittests/test_parallel_dygraph_sparse_embedding_gloo.py
.../unittests/test_parallel_dygraph_sparse_embedding_gloo.py
+0
-5
python/paddle/fluid/tests/unittests/test_parallel_dygraph_sparse_embedding_over_height_gloo.py
...est_parallel_dygraph_sparse_embedding_over_height_gloo.py
+0
-4
python/paddle/fluid/tests/unittests/test_parallel_dygraph_transformer_gloo.py
...tests/unittests/test_parallel_dygraph_transformer_gloo.py
+0
-3
python/paddle/fluid/tests/unittests/test_parallel_dygraph_unused_variables_gloo.py
.../unittests/test_parallel_dygraph_unused_variables_gloo.py
+0
-4
python/paddle/fluid/tests/unittests/test_parallel_executor_crf.py
...addle/fluid/tests/unittests/test_parallel_executor_crf.py
+0
-1
python/paddle/fluid/tests/unittests/test_parallel_executor_profiler.py
.../fluid/tests/unittests/test_parallel_executor_profiler.py
+0
-1
python/paddle/fluid/tests/unittests/test_parallel_executor_transformer.py
...uid/tests/unittests/test_parallel_executor_transformer.py
+0
-1
python/paddle/fluid/tests/unittests/test_parallel_executor_transformer_auto_growth.py
...ittests/test_parallel_executor_transformer_auto_growth.py
+0
-1
python/paddle/fluid/tests/unittests/test_parallel_ssa_graph_inference_feed_partial_data.py
...ts/test_parallel_ssa_graph_inference_feed_partial_data.py
+0
-2
python/paddle/fluid/tests/unittests/test_partial_eager_deletion_transformer.py
...ests/unittests/test_partial_eager_deletion_transformer.py
+0
-2
python/paddle/fluid/tests/unittests/test_partial_sum_op.py
python/paddle/fluid/tests/unittests/test_partial_sum_op.py
+0
-4
python/paddle/fluid/tests/unittests/test_pipeline_parallel.py
...on/paddle/fluid/tests/unittests/test_pipeline_parallel.py
+0
-1
python/paddle/fluid/tests/unittests/test_poisson_op.py
python/paddle/fluid/tests/unittests/test_poisson_op.py
+0
-1
python/paddle/fluid/tests/unittests/test_pool1d_api.py
python/paddle/fluid/tests/unittests/test_pool1d_api.py
+0
-2
python/paddle/fluid/tests/unittests/test_pool2d_api.py
python/paddle/fluid/tests/unittests/test_pool2d_api.py
+1
-2
python/paddle/fluid/tests/unittests/test_pool3d_api.py
python/paddle/fluid/tests/unittests/test_pool3d_api.py
+1
-2
python/paddle/fluid/tests/unittests/test_pow.py
python/paddle/fluid/tests/unittests/test_pow.py
+0
-1
python/paddle/fluid/tests/unittests/test_prelu_op.py
python/paddle/fluid/tests/unittests/test_prelu_op.py
+1
-2
python/paddle/fluid/tests/unittests/test_print_op.py
python/paddle/fluid/tests/unittests/test_print_op.py
+0
-1
python/paddle/fluid/tests/unittests/test_prior_box_op.py
python/paddle/fluid/tests/unittests/test_prior_box_op.py
+0
-1
python/paddle/fluid/tests/unittests/test_profiler.py
python/paddle/fluid/tests/unittests/test_profiler.py
+0
-1
python/paddle/fluid/tests/unittests/test_profiler_statistic.py
...n/paddle/fluid/tests/unittests/test_profiler_statistic.py
+0
-1
python/paddle/fluid/tests/unittests/test_program.py
python/paddle/fluid/tests/unittests/test_program.py
+1
-1
python/paddle/fluid/tests/unittests/test_prroi_pool_op.py
python/paddle/fluid/tests/unittests/test_prroi_pool_op.py
+1
-2
python/paddle/fluid/tests/unittests/test_pull_gpups_sparse_op.py
...paddle/fluid/tests/unittests/test_pull_gpups_sparse_op.py
+0
-2
python/paddle/fluid/tests/unittests/test_put_along_axis_op.py
...on/paddle/fluid/tests/unittests/test_put_along_axis_op.py
+0
-2
python/paddle/fluid/tests/unittests/test_py_reader_pin_memory.py
...paddle/fluid/tests/unittests/test_py_reader_pin_memory.py
+0
-1
python/paddle/fluid/tests/unittests/test_qr_op.py
python/paddle/fluid/tests/unittests/test_qr_op.py
+0
-1
python/paddle/fluid/tests/unittests/test_queue.py
python/paddle/fluid/tests/unittests/test_queue.py
+0
-1
python/paddle/fluid/tests/unittests/test_rad2deg.py
python/paddle/fluid/tests/unittests/test_rad2deg.py
+0
-2
python/paddle/fluid/tests/unittests/test_rand_op.py
python/paddle/fluid/tests/unittests/test_rand_op.py
+1
-2
python/paddle/fluid/tests/unittests/test_randint_op.py
python/paddle/fluid/tests/unittests/test_randint_op.py
+0
-1
python/paddle/fluid/tests/unittests/test_random_crop_op.py
python/paddle/fluid/tests/unittests/test_random_crop_op.py
+0
-1
python/paddle/fluid/tests/unittests/test_random_routing_op.py
...on/paddle/fluid/tests/unittests/test_random_routing_op.py
+0
-5
python/paddle/fluid/tests/unittests/test_random_seed.py
python/paddle/fluid/tests/unittests/test_random_seed.py
+0
-1
python/paddle/fluid/tests/unittests/test_randperm_op.py
python/paddle/fluid/tests/unittests/test_randperm_op.py
+0
-1
python/paddle/fluid/tests/unittests/test_rank_attention_op.py
...on/paddle/fluid/tests/unittests/test_rank_attention_op.py
+1
-3
python/paddle/fluid/tests/unittests/test_raw_program_optimizer.py
...addle/fluid/tests/unittests/test_raw_program_optimizer.py
+0
-1
python/paddle/fluid/tests/unittests/test_reduce_op.py
python/paddle/fluid/tests/unittests/test_reduce_op.py
+1
-1
python/paddle/fluid/tests/unittests/test_reducescatter.py
python/paddle/fluid/tests/unittests/test_reducescatter.py
+0
-1
python/paddle/fluid/tests/unittests/test_reducescatter_api.py
...on/paddle/fluid/tests/unittests/test_reducescatter_api.py
+0
-1
python/paddle/fluid/tests/unittests/test_regularizer.py
python/paddle/fluid/tests/unittests/test_regularizer.py
+0
-1
python/paddle/fluid/tests/unittests/test_regularizer_api.py
python/paddle/fluid/tests/unittests/test_regularizer_api.py
+0
-4
python/paddle/fluid/tests/unittests/test_renorm_op.py
python/paddle/fluid/tests/unittests/test_renorm_op.py
+0
-1
python/paddle/fluid/tests/unittests/test_repeat_interleave_op.py
...paddle/fluid/tests/unittests/test_repeat_interleave_op.py
+0
-1
python/paddle/fluid/tests/unittests/test_reset_grad_inplace_version.py
.../fluid/tests/unittests/test_reset_grad_inplace_version.py
+1
-3
python/paddle/fluid/tests/unittests/test_reshape_op.py
python/paddle/fluid/tests/unittests/test_reshape_op.py
+0
-2
python/paddle/fluid/tests/unittests/test_retinanet_detection_output.py
.../fluid/tests/unittests/test_retinanet_detection_output.py
+0
-2
python/paddle/fluid/tests/unittests/test_rnn_decode_api.py
python/paddle/fluid/tests/unittests/test_rnn_decode_api.py
+0
-1
python/paddle/fluid/tests/unittests/test_rnn_memory_helper_op.py
...paddle/fluid/tests/unittests/test_rnn_memory_helper_op.py
+0
-1
python/paddle/fluid/tests/unittests/test_rnn_op.py
python/paddle/fluid/tests/unittests/test_rnn_op.py
+1
-4
python/paddle/fluid/tests/unittests/test_roi_align_op.py
python/paddle/fluid/tests/unittests/test_roi_align_op.py
+0
-1
python/paddle/fluid/tests/unittests/test_roi_perspective_transform_op.py
...luid/tests/unittests/test_roi_perspective_transform_op.py
+0
-3
python/paddle/fluid/tests/unittests/test_roll_op.py
python/paddle/fluid/tests/unittests/test_roll_op.py
+0
-1
python/paddle/fluid/tests/unittests/test_rot90_op.py
python/paddle/fluid/tests/unittests/test_rot90_op.py
+0
-2
python/paddle/fluid/tests/unittests/test_rpn_target_assign_op.py
...paddle/fluid/tests/unittests/test_rpn_target_assign_op.py
+0
-1
python/paddle/fluid/tests/unittests/test_run.py
python/paddle/fluid/tests/unittests/test_run.py
+0
-2
python/paddle/fluid/tests/unittests/test_run_program_op.py
python/paddle/fluid/tests/unittests/test_run_program_op.py
+2
-2
python/paddle/fluid/tests/unittests/test_runtime_and_compiletime_exception.py
...tests/unittests/test_runtime_and_compiletime_exception.py
+0
-2
python/paddle/fluid/tests/unittests/test_sampling_id_op.py
python/paddle/fluid/tests/unittests/test_sampling_id_op.py
+0
-3
python/paddle/fluid/tests/unittests/test_save_inference_model_conditional_op.py
...sts/unittests/test_save_inference_model_conditional_op.py
+0
-2
python/paddle/fluid/tests/unittests/test_save_model_without_var.py
...ddle/fluid/tests/unittests/test_save_model_without_var.py
+0
-4
python/paddle/fluid/tests/unittests/test_saved_tensors_hooks.py
.../paddle/fluid/tests/unittests/test_saved_tensors_hooks.py
+0
-1
python/paddle/fluid/tests/unittests/test_scope.py
python/paddle/fluid/tests/unittests/test_scope.py
+0
-1
python/paddle/fluid/tests/unittests/test_searchsorted_op.py
python/paddle/fluid/tests/unittests/test_searchsorted_op.py
+0
-1
python/paddle/fluid/tests/unittests/test_segment_ops.py
python/paddle/fluid/tests/unittests/test_segment_ops.py
+0
-1
python/paddle/fluid/tests/unittests/test_selu_op.py
python/paddle/fluid/tests/unittests/test_selu_op.py
+0
-3
python/paddle/fluid/tests/unittests/test_set_value_op.py
python/paddle/fluid/tests/unittests/test_set_value_op.py
+1
-1
python/paddle/fluid/tests/unittests/test_shard_index_op.py
python/paddle/fluid/tests/unittests/test_shard_index_op.py
+0
-5
python/paddle/fluid/tests/unittests/test_shrink_rnn_memory.py
...on/paddle/fluid/tests/unittests/test_shrink_rnn_memory.py
+1
-1
python/paddle/fluid/tests/unittests/test_shuffle_batch_op.py
python/paddle/fluid/tests/unittests/test_shuffle_batch_op.py
+0
-3
python/paddle/fluid/tests/unittests/test_shuffle_channel_op.py
...n/paddle/fluid/tests/unittests/test_shuffle_channel_op.py
+0
-3
python/paddle/fluid/tests/unittests/test_sigmoid_cross_entropy_with_logits_op.py
...ts/unittests/test_sigmoid_cross_entropy_with_logits_op.py
+1
-2
python/paddle/fluid/tests/unittests/test_sigmoid_focal_loss.py
...n/paddle/fluid/tests/unittests/test_sigmoid_focal_loss.py
+0
-2
python/paddle/fluid/tests/unittests/test_similarity_focus_op.py
.../paddle/fluid/tests/unittests/test_similarity_focus_op.py
+0
-1
python/paddle/fluid/tests/unittests/test_simple_rnn_op.py
python/paddle/fluid/tests/unittests/test_simple_rnn_op.py
+0
-3
python/paddle/fluid/tests/unittests/test_slice_var.py
python/paddle/fluid/tests/unittests/test_slice_var.py
+0
-2
python/paddle/fluid/tests/unittests/test_softmax2d.py
python/paddle/fluid/tests/unittests/test_softmax2d.py
+0
-1
python/paddle/fluid/tests/unittests/test_softmax_op.py
python/paddle/fluid/tests/unittests/test_softmax_op.py
+0
-2
python/paddle/fluid/tests/unittests/test_solve_op.py
python/paddle/fluid/tests/unittests/test_solve_op.py
+0
-4
python/paddle/fluid/tests/unittests/test_sort_op.py
python/paddle/fluid/tests/unittests/test_sort_op.py
+0
-2
python/paddle/fluid/tests/unittests/test_sparse_addmm_op.py
python/paddle/fluid/tests/unittests/test_sparse_addmm_op.py
+0
-2
python/paddle/fluid/tests/unittests/test_sparse_attention_op.py
.../paddle/fluid/tests/unittests/test_sparse_attention_op.py
+0
-2
python/paddle/fluid/tests/unittests/test_sparse_conv_op.py
python/paddle/fluid/tests/unittests/test_sparse_conv_op.py
+0
-1
python/paddle/fluid/tests/unittests/test_sparse_copy_op.py
python/paddle/fluid/tests/unittests/test_sparse_copy_op.py
+0
-2
python/paddle/fluid/tests/unittests/test_sparse_matmul_op.py
python/paddle/fluid/tests/unittests/test_sparse_matmul_op.py
+0
-1
python/paddle/fluid/tests/unittests/test_sparse_momentum_op.py
...n/paddle/fluid/tests/unittests/test_sparse_momentum_op.py
+0
-4
python/paddle/fluid/tests/unittests/test_sparse_mv_op.py
python/paddle/fluid/tests/unittests/test_sparse_mv_op.py
+0
-2
python/paddle/fluid/tests/unittests/test_sparse_pooling_op.py
...on/paddle/fluid/tests/unittests/test_sparse_pooling_op.py
+0
-2
python/paddle/fluid/tests/unittests/test_sparse_softmax_op.py
...on/paddle/fluid/tests/unittests/test_sparse_softmax_op.py
+0
-4
python/paddle/fluid/tests/unittests/test_sparse_utils_op.py
python/paddle/fluid/tests/unittests/test_sparse_utils_op.py
+0
-1
python/paddle/fluid/tests/unittests/test_spawn_and_init_parallel_env.py
...fluid/tests/unittests/test_spawn_and_init_parallel_env.py
+0
-1
python/paddle/fluid/tests/unittests/test_spectral_norm_op.py
python/paddle/fluid/tests/unittests/test_spectral_norm_op.py
+0
-1
python/paddle/fluid/tests/unittests/test_split_op.py
python/paddle/fluid/tests/unittests/test_split_op.py
+1
-1
python/paddle/fluid/tests/unittests/test_split_program.py
python/paddle/fluid/tests/unittests/test_split_program.py
+0
-1
python/paddle/fluid/tests/unittests/test_splits_api.py
python/paddle/fluid/tests/unittests/test_splits_api.py
+0
-1
python/paddle/fluid/tests/unittests/test_square_error_cost.py
...on/paddle/fluid/tests/unittests/test_square_error_cost.py
+0
-1
python/paddle/fluid/tests/unittests/test_squeeze_op.py
python/paddle/fluid/tests/unittests/test_squeeze_op.py
+1
-1
python/paddle/fluid/tests/unittests/test_stack_op.py
python/paddle/fluid/tests/unittests/test_stack_op.py
+0
-1
python/paddle/fluid/tests/unittests/test_static_save_load.py
python/paddle/fluid/tests/unittests/test_static_save_load.py
+0
-4
python/paddle/fluid/tests/unittests/test_static_save_load_large.py
...ddle/fluid/tests/unittests/test_static_save_load_large.py
+0
-1
python/paddle/fluid/tests/unittests/test_sum_op.py
python/paddle/fluid/tests/unittests/test_sum_op.py
+0
-1
python/paddle/fluid/tests/unittests/test_svd_op.py
python/paddle/fluid/tests/unittests/test_svd_op.py
+0
-3
python/paddle/fluid/tests/unittests/test_take_along_axis_op.py
...n/paddle/fluid/tests/unittests/test_take_along_axis_op.py
+0
-2
python/paddle/fluid/tests/unittests/test_tdm_child_op.py
python/paddle/fluid/tests/unittests/test_tdm_child_op.py
+0
-5
python/paddle/fluid/tests/unittests/test_tdm_sampler_op.py
python/paddle/fluid/tests/unittests/test_tdm_sampler_op.py
+0
-5
python/paddle/fluid/tests/unittests/test_teacher_student_sigmoid_loss_op.py
...d/tests/unittests/test_teacher_student_sigmoid_loss_op.py
+0
-1
python/paddle/fluid/tests/unittests/test_tensor_array_to_tensor.py
...ddle/fluid/tests/unittests/test_tensor_array_to_tensor.py
+0
-2
python/paddle/fluid/tests/unittests/test_tensor_fill_diagonal_.py
...addle/fluid/tests/unittests/test_tensor_fill_diagonal_.py
+0
-1
python/paddle/fluid/tests/unittests/test_tensor_fill_diagonal_tensor.py
...fluid/tests/unittests/test_tensor_fill_diagonal_tensor.py
+0
-1
python/paddle/fluid/tests/unittests/test_tensor_fill_diagonal_tensor_.py
...luid/tests/unittests/test_tensor_fill_diagonal_tensor_.py
+0
-1
python/paddle/fluid/tests/unittests/test_tensor_type_promotion.py
...addle/fluid/tests/unittests/test_tensor_type_promotion.py
+0
-1
python/paddle/fluid/tests/unittests/test_tensordot.py
python/paddle/fluid/tests/unittests/test_tensordot.py
+0
-1
python/paddle/fluid/tests/unittests/test_tf32_cublas.py
python/paddle/fluid/tests/unittests/test_tf32_cublas.py
+0
-1
python/paddle/fluid/tests/unittests/test_tf32_cudnn.py
python/paddle/fluid/tests/unittests/test_tf32_cudnn.py
+0
-4
python/paddle/fluid/tests/unittests/test_tile_op.py
python/paddle/fluid/tests/unittests/test_tile_op.py
+1
-1
python/paddle/fluid/tests/unittests/test_top_k_op.py
python/paddle/fluid/tests/unittests/test_top_k_op.py
+0
-1
python/paddle/fluid/tests/unittests/test_top_k_v2_op.py
python/paddle/fluid/tests/unittests/test_top_k_v2_op.py
+0
-1
python/paddle/fluid/tests/unittests/test_trace_op.py
python/paddle/fluid/tests/unittests/test_trace_op.py
+0
-1
python/paddle/fluid/tests/unittests/test_trainer_desc.py
python/paddle/fluid/tests/unittests/test_trainer_desc.py
+0
-3
python/paddle/fluid/tests/unittests/test_transfer_dtype_op.py
...on/paddle/fluid/tests/unittests/test_transfer_dtype_op.py
+0
-1
python/paddle/fluid/tests/unittests/test_tril_indices_op.py
python/paddle/fluid/tests/unittests/test_tril_indices_op.py
+0
-1
python/paddle/fluid/tests/unittests/test_triu_indices_op.py
python/paddle/fluid/tests/unittests/test_triu_indices_op.py
+0
-1
python/paddle/fluid/tests/unittests/test_trunc_op.py
python/paddle/fluid/tests/unittests/test_trunc_op.py
+0
-3
python/paddle/fluid/tests/unittests/test_truncated_gaussian_random_op.py
...luid/tests/unittests/test_truncated_gaussian_random_op.py
+0
-2
未找到文件。
python/paddle/fluid/tests/unittests/test_paddle_imperative_double_grad.py
浏览文件 @
a20f7648
...
@@ -19,7 +19,6 @@ from unittest import TestCase
...
@@ -19,7 +19,6 @@ from unittest import TestCase
import
numpy
as
np
import
numpy
as
np
import
paddle
import
paddle
from
paddle.fluid.framework
import
_test_eager_guard
,
_in_legacy_dygraph
from
paddle.fluid.framework
import
_test_eager_guard
,
_in_legacy_dygraph
import
paddle.fluid.core
as
core
def
_dygraph_guard_
(
func
):
def
_dygraph_guard_
(
func
):
...
...
python/paddle/fluid/tests/unittests/test_paddle_multiprocessing.py
浏览文件 @
a20f7648
...
@@ -14,12 +14,11 @@
...
@@ -14,12 +14,11 @@
import
os
import
os
import
gc
import
gc
import
sys
import
unittest
import
unittest
import
time
import
time
import
paddle
import
paddle
import
paddle.incubate.multiprocessing
as
mp
import
paddle.incubate.multiprocessing
as
mp
from
paddle.fluid.framework
import
_
test_eager_guard
,
_in_legacy_dygraph
,
in_dygraph_mode
,
_enable_legacy_dygraph
from
paddle.fluid.framework
import
_
enable_legacy_dygraph
,
_test_eager_guard
,
in_dygraph_mode
REPEAT
=
20
REPEAT
=
20
HAS_SHM_FILES
=
os
.
path
.
isdir
(
'/dev/shm'
)
HAS_SHM_FILES
=
os
.
path
.
isdir
(
'/dev/shm'
)
...
...
python/paddle/fluid/tests/unittests/test_paddle_save_load_binary.py
浏览文件 @
a20f7648
...
@@ -16,16 +16,11 @@ import unittest
...
@@ -16,16 +16,11 @@ import unittest
import
numpy
as
np
import
numpy
as
np
from
io
import
BytesIO
from
io
import
BytesIO
import
os
import
os
import
sys
import
six
import
platform
import
platform
import
tempfile
import
tempfile
import
paddle
import
paddle
import
paddle.nn
as
nn
import
paddle.optimizer
as
opt
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
from
paddle.fluid.optimizer
import
Adam
import
paddle.fluid.framework
as
framework
import
paddle.fluid.framework
as
framework
from
test_imperative_base
import
new_program_scope
from
test_imperative_base
import
new_program_scope
...
...
python/paddle/fluid/tests/unittests/test_parallel_dygraph_dataparallel.py
浏览文件 @
a20f7648
...
@@ -14,14 +14,12 @@
...
@@ -14,14 +14,12 @@
import
unittest
import
unittest
import
time
import
time
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
import
copy
import
copy
import
os
import
os
import
subprocess
import
subprocess
from
paddle.distributed.utils.launch_utils
import
find_free_ports
,
watch_local_trainers
,
get_cluster
,
TrainerProc
from
paddle.distributed.utils.launch_utils
import
find_free_ports
,
watch_local_trainers
,
get_cluster
,
TrainerProc
from
paddle.fluid.framework
import
_test_eager_guard
def
get_cluster_from_args
(
selected_gpus
):
def
get_cluster_from_args
(
selected_gpus
):
...
...
python/paddle/fluid/tests/unittests/test_parallel_dygraph_dataparallel_cpuonly.py
浏览文件 @
a20f7648
...
@@ -14,8 +14,6 @@
...
@@ -14,8 +14,6 @@
import
unittest
import
unittest
import
time
import
time
import
paddle
import
paddle.fluid
as
fluid
import
copy
import
copy
import
os
import
os
import
subprocess
import
subprocess
...
...
python/paddle/fluid/tests/unittests/test_parallel_dygraph_sparse_embedding_diff_length_gloo.py
浏览文件 @
a20f7648
...
@@ -13,14 +13,9 @@
...
@@ -13,14 +13,9 @@
# limitations under the License.
# limitations under the License.
import
os
import
os
import
sys
import
unittest
import
unittest
import
paddle.fluid
as
fluid
from
test_dist_base
import
TestDistBase
from
test_dist_base
import
TestDistBase
from
spawn_runner_base
import
TestDistSpawnRunner
from
parallel_dygraph_sparse_embedding
import
TestSparseEmbedding
from
parallel_dygraph_sparse_embedding_fp64
import
TestSparseEmbeddingFP64
flag_name
=
os
.
path
.
splitext
(
__file__
)[
0
]
flag_name
=
os
.
path
.
splitext
(
__file__
)[
0
]
...
...
python/paddle/fluid/tests/unittests/test_parallel_dygraph_sparse_embedding_gloo.py
浏览文件 @
a20f7648
...
@@ -13,14 +13,9 @@
...
@@ -13,14 +13,9 @@
# limitations under the License.
# limitations under the License.
import
os
import
os
import
sys
import
unittest
import
unittest
import
paddle.fluid
as
fluid
from
test_dist_base
import
TestDistBase
from
test_dist_base
import
TestDistBase
from
spawn_runner_base
import
TestDistSpawnRunner
from
parallel_dygraph_sparse_embedding
import
TestSparseEmbedding
from
parallel_dygraph_sparse_embedding_fp64
import
TestSparseEmbeddingFP64
flag_name
=
os
.
path
.
splitext
(
__file__
)[
0
]
flag_name
=
os
.
path
.
splitext
(
__file__
)[
0
]
...
...
python/paddle/fluid/tests/unittests/test_parallel_dygraph_sparse_embedding_over_height_gloo.py
浏览文件 @
a20f7648
...
@@ -13,13 +13,9 @@
...
@@ -13,13 +13,9 @@
# limitations under the License.
# limitations under the License.
import
os
import
os
import
sys
import
unittest
import
unittest
import
paddle.fluid
as
fluid
from
test_dist_base
import
TestDistBase
from
test_dist_base
import
TestDistBase
from
spawn_runner_base
import
TestDistSpawnRunner
from
parallel_dygraph_sparse_embedding_over_height
import
TestSparseEmbeddingOverHeight
flag_name
=
os
.
path
.
splitext
(
__file__
)[
0
]
flag_name
=
os
.
path
.
splitext
(
__file__
)[
0
]
...
...
python/paddle/fluid/tests/unittests/test_parallel_dygraph_transformer_gloo.py
浏览文件 @
a20f7648
...
@@ -13,13 +13,10 @@
...
@@ -13,13 +13,10 @@
# limitations under the License.
# limitations under the License.
import
os
import
os
import
sys
import
unittest
import
unittest
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
from
test_dist_base
import
TestDistBase
from
test_dist_base
import
TestDistBase
from
spawn_runner_base
import
TestDistSpawnRunner
from
parallel_dygraph_transformer
import
TestTransformer
flag_name
=
os
.
path
.
splitext
(
__file__
)[
0
]
flag_name
=
os
.
path
.
splitext
(
__file__
)[
0
]
...
...
python/paddle/fluid/tests/unittests/test_parallel_dygraph_unused_variables_gloo.py
浏览文件 @
a20f7648
...
@@ -13,13 +13,9 @@
...
@@ -13,13 +13,9 @@
# limitations under the License.
# limitations under the License.
import
os
import
os
import
sys
import
unittest
import
unittest
import
paddle.fluid
as
fluid
from
test_dist_base
import
TestDistBase
from
test_dist_base
import
TestDistBase
from
spawn_runner_base
import
TestDistSpawnRunner
from
parallel_dygraph_unused_variables
import
TestSparseEmbeddingUnusedVars
flag_name
=
os
.
path
.
splitext
(
__file__
)[
0
]
flag_name
=
os
.
path
.
splitext
(
__file__
)[
0
]
...
...
python/paddle/fluid/tests/unittests/test_parallel_executor_crf.py
浏览文件 @
a20f7648
...
@@ -18,7 +18,6 @@ from paddle.fluid import compiler
...
@@ -18,7 +18,6 @@ from paddle.fluid import compiler
import
paddle.fluid.core
as
core
import
paddle.fluid.core
as
core
import
unittest
import
unittest
import
paddle
import
paddle
import
numpy
as
np
import
os
import
os
word_dict
,
verb_dict
,
label_dict
=
conll05
.
get_dict
()
word_dict
,
verb_dict
,
label_dict
=
conll05
.
get_dict
()
...
...
python/paddle/fluid/tests/unittests/test_parallel_executor_profiler.py
浏览文件 @
a20f7648
...
@@ -13,7 +13,6 @@
...
@@ -13,7 +13,6 @@
# limitations under the License.
# limitations under the License.
import
unittest
import
unittest
import
numpy
as
np
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.fluid.core
as
core
import
paddle.fluid.core
as
core
from
paddle.fluid.tests.unittests.test_profiler
import
TestProfiler
from
paddle.fluid.tests.unittests.test_profiler
import
TestProfiler
...
...
python/paddle/fluid/tests/unittests/test_parallel_executor_transformer.py
浏览文件 @
a20f7648
...
@@ -12,7 +12,6 @@
...
@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
paddle.fluid
as
fluid
import
transformer_model
import
transformer_model
import
numpy
as
np
import
numpy
as
np
from
parallel_executor_test_base
import
TestParallelExecutorBase
,
DeviceType
from
parallel_executor_test_base
import
TestParallelExecutorBase
,
DeviceType
...
...
python/paddle/fluid/tests/unittests/test_parallel_executor_transformer_auto_growth.py
浏览文件 @
a20f7648
...
@@ -13,7 +13,6 @@
...
@@ -13,7 +13,6 @@
# limitations under the License.
# limitations under the License.
import
unittest
import
unittest
from
test_parallel_executor_transformer
import
*
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
unittest
.
main
()
unittest
.
main
()
python/paddle/fluid/tests/unittests/test_parallel_ssa_graph_inference_feed_partial_data.py
浏览文件 @
a20f7648
...
@@ -17,7 +17,5 @@ import unittest
...
@@ -17,7 +17,5 @@ import unittest
fluid
.
core
.
globals
()[
'FLAGS_enable_parallel_graph'
]
=
1
fluid
.
core
.
globals
()[
'FLAGS_enable_parallel_graph'
]
=
1
from
test_parallel_executor_inference_feed_partial_data
import
*
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
unittest
.
main
()
unittest
.
main
()
python/paddle/fluid/tests/unittests/test_partial_eager_deletion_transformer.py
浏览文件 @
a20f7648
...
@@ -18,8 +18,6 @@ import paddle
...
@@ -18,8 +18,6 @@ import paddle
fluid
.
core
.
_set_eager_deletion_mode
(
0.0
,
0.55
,
True
)
fluid
.
core
.
_set_eager_deletion_mode
(
0.0
,
0.55
,
True
)
from
test_parallel_executor_transformer
import
TestTransformer
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
paddle
.
enable_static
()
paddle
.
enable_static
()
unittest
.
main
()
unittest
.
main
()
python/paddle/fluid/tests/unittests/test_partial_sum_op.py
浏览文件 @
a20f7648
...
@@ -15,10 +15,6 @@
...
@@ -15,10 +15,6 @@
import
unittest
import
unittest
import
numpy
as
np
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
import
paddle.fluid.layers
as
layers
import
paddle.fluid
as
fluid
import
random
import
random
import
six
import
six
...
...
python/paddle/fluid/tests/unittests/test_pipeline_parallel.py
浏览文件 @
a20f7648
...
@@ -13,7 +13,6 @@
...
@@ -13,7 +13,6 @@
# limitations under the License.
# limitations under the License.
import
unittest
import
unittest
import
paddle.fluid
as
fluid
from
test_parallel_dygraph_dataparallel
import
TestMultipleGpus
from
test_parallel_dygraph_dataparallel
import
TestMultipleGpus
...
...
python/paddle/fluid/tests/unittests/test_poisson_op.py
浏览文件 @
a20f7648
...
@@ -17,7 +17,6 @@ import paddle
...
@@ -17,7 +17,6 @@ import paddle
import
numpy
as
np
import
numpy
as
np
from
op_test
import
OpTest
from
op_test
import
OpTest
import
math
import
math
import
os
from
paddle.fluid.framework
import
_test_eager_guard
from
paddle.fluid.framework
import
_test_eager_guard
paddle
.
enable_static
()
paddle
.
enable_static
()
...
...
python/paddle/fluid/tests/unittests/test_pool1d_api.py
浏览文件 @
a20f7648
...
@@ -18,8 +18,6 @@ import paddle.fluid as fluid
...
@@ -18,8 +18,6 @@ import paddle.fluid as fluid
import
paddle.fluid.core
as
core
import
paddle.fluid.core
as
core
import
paddle.nn.functional
as
F
import
paddle.nn.functional
as
F
import
numpy
as
np
import
numpy
as
np
from
op_test
import
OpTest
from
paddle.fluid
import
compiler
,
Program
,
program_guard
from
paddle.fluid.framework
import
_test_eager_guard
from
paddle.fluid.framework
import
_test_eager_guard
...
...
python/paddle/fluid/tests/unittests/test_pool2d_api.py
浏览文件 @
a20f7648
...
@@ -17,10 +17,9 @@ import paddle
...
@@ -17,10 +17,9 @@ import paddle
import
numpy
as
np
import
numpy
as
np
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.fluid.core
as
core
import
paddle.fluid.core
as
core
from
op_test
import
OpTest
from
paddle.fluid.framework
import
_test_eager_guard
from
paddle.fluid.framework
import
_test_eager_guard
from
paddle.nn.functional
import
avg_pool2d
,
max_pool2d
from
paddle.nn.functional
import
avg_pool2d
,
max_pool2d
from
test_pool2d_op
import
a
daptive_start_index
,
adaptive_end_index
,
pool2D_forward_naive
,
avg_pool2D_forward_naive
,
max_
pool2D_forward_naive
from
test_pool2d_op
import
a
vg_pool2D_forward_naive
,
max_pool2D_forward_naive
,
pool2D_forward_naive
class
TestPool2D_API
(
unittest
.
TestCase
):
class
TestPool2D_API
(
unittest
.
TestCase
):
...
...
python/paddle/fluid/tests/unittests/test_pool3d_api.py
浏览文件 @
a20f7648
...
@@ -17,11 +17,10 @@ import unittest
...
@@ -17,11 +17,10 @@ import unittest
import
numpy
as
np
import
numpy
as
np
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.fluid.core
as
core
import
paddle.fluid.core
as
core
from
op_test
import
OpTest
from
paddle.fluid.framework
import
_test_eager_guard
from
paddle.fluid.framework
import
_test_eager_guard
from
paddle.nn.functional
import
avg_pool3d
,
max_pool3d
from
paddle.nn.functional
import
avg_pool3d
,
max_pool3d
from
paddle.fluid.framework
import
_test_eager_guard
from
paddle.fluid.framework
import
_test_eager_guard
from
test_pool3d_op
import
a
daptive_start_index
,
adaptive_end_index
,
pool3D_forward_naive
,
avg_pool3D_forward_naive
,
max_
pool3D_forward_naive
from
test_pool3d_op
import
a
vg_pool3D_forward_naive
,
max_pool3D_forward_naive
,
pool3D_forward_naive
class
TestPool3D_API
(
unittest
.
TestCase
):
class
TestPool3D_API
(
unittest
.
TestCase
):
...
...
python/paddle/fluid/tests/unittests/test_pow.py
浏览文件 @
a20f7648
...
@@ -17,7 +17,6 @@ import unittest
...
@@ -17,7 +17,6 @@ import unittest
import
numpy
as
np
import
numpy
as
np
import
paddle
import
paddle
import
paddle.tensor
as
tensor
from
paddle.static
import
Program
,
program_guard
from
paddle.static
import
Program
,
program_guard
DYNAMIC
=
1
DYNAMIC
=
1
...
...
python/paddle/fluid/tests/unittests/test_prelu_op.py
浏览文件 @
a20f7648
...
@@ -15,9 +15,8 @@
...
@@ -15,9 +15,8 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
import
six
import
paddle.fluid.core
as
core
import
paddle.fluid.core
as
core
from
paddle.fluid
import
Program
,
program_guard
from
paddle.fluid
import
Program
from
op_test
import
OpTest
,
skip_check_grad_ci
from
op_test
import
OpTest
,
skip_check_grad_ci
import
paddle
import
paddle
import
paddle.nn.functional
as
F
import
paddle.nn.functional
as
F
...
...
python/paddle/fluid/tests/unittests/test_print_op.py
浏览文件 @
a20f7648
...
@@ -16,7 +16,6 @@ import unittest
...
@@ -16,7 +16,6 @@ import unittest
import
numpy
as
np
import
numpy
as
np
from
op_test
import
OpTest
import
paddle
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.fluid.layers
as
layers
import
paddle.fluid.layers
as
layers
...
...
python/paddle/fluid/tests/unittests/test_prior_box_op.py
浏览文件 @
a20f7648
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
import
sys
import
math
import
math
from
op_test
import
OpTest
from
op_test
import
OpTest
import
paddle
import
paddle
...
...
python/paddle/fluid/tests/unittests/test_profiler.py
浏览文件 @
a20f7648
...
@@ -22,7 +22,6 @@ import paddle.fluid as fluid
...
@@ -22,7 +22,6 @@ import paddle.fluid as fluid
import
paddle.fluid.profiler
as
profiler
import
paddle.fluid.profiler
as
profiler
import
paddle.fluid.layers
as
layers
import
paddle.fluid.layers
as
layers
import
paddle.fluid.core
as
core
import
paddle.fluid.core
as
core
from
paddle.fluid
import
compiler
,
Program
,
program_guard
import
paddle.fluid.proto.profiler.profiler_pb2
as
profiler_pb2
import
paddle.fluid.proto.profiler.profiler_pb2
as
profiler_pb2
...
...
python/paddle/fluid/tests/unittests/test_profiler_statistic.py
浏览文件 @
a20f7648
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
import
unittest
import
unittest
import
paddle
import
paddle.profiler
as
profiler
import
paddle.profiler
as
profiler
import
paddle.profiler.profiler_statistic
as
profiler_statistic
import
paddle.profiler.profiler_statistic
as
profiler_statistic
...
...
python/paddle/fluid/tests/unittests/test_program.py
浏览文件 @
a20f7648
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
import
unittest
import
unittest
from
paddle.fluid.framework
import
Program
,
default_main_program
,
program_guard
,
grad_var_name
from
paddle.fluid.framework
import
Program
,
default_main_program
,
program_guard
import
paddle
import
paddle
import
paddle.fluid.layers
as
layers
import
paddle.fluid.layers
as
layers
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
...
...
python/paddle/fluid/tests/unittests/test_prroi_pool_op.py
浏览文件 @
a20f7648
...
@@ -18,8 +18,7 @@ from py_precise_roi_pool import PyPrRoIPool
...
@@ -18,8 +18,7 @@ from py_precise_roi_pool import PyPrRoIPool
from
op_test
import
OpTest
from
op_test
import
OpTest
import
paddle
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.fluid.core
as
core
from
paddle.fluid
import
Program
,
program_guard
from
paddle.fluid
import
compiler
,
Program
,
program_guard
class
TestPRROIPoolOp
(
OpTest
):
class
TestPRROIPoolOp
(
OpTest
):
...
...
python/paddle/fluid/tests/unittests/test_pull_gpups_sparse_op.py
浏览文件 @
a20f7648
...
@@ -16,8 +16,6 @@ import unittest
...
@@ -16,8 +16,6 @@ import unittest
import
numpy
as
np
import
numpy
as
np
import
paddle
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.fluid.core
as
core
from
paddle.fluid
import
Program
,
program_guard
from
paddle.fluid.layers.nn
import
_pull_gpups_sparse
from
paddle.fluid.layers.nn
import
_pull_gpups_sparse
paddle
.
enable_static
()
paddle
.
enable_static
()
...
...
python/paddle/fluid/tests/unittests/test_put_along_axis_op.py
浏览文件 @
a20f7648
...
@@ -17,9 +17,7 @@ import numpy as np
...
@@ -17,9 +17,7 @@ import numpy as np
import
copy
import
copy
from
op_test
import
OpTest
from
op_test
import
OpTest
import
paddle
import
paddle
import
paddle.fluid
as
fluid
from
paddle.framework
import
core
from
paddle.framework
import
core
from
paddle.fluid.dygraph.base
import
switch_to_static_graph
paddle
.
enable_static
()
paddle
.
enable_static
()
...
...
python/paddle/fluid/tests/unittests/test_py_reader_pin_memory.py
浏览文件 @
a20f7648
...
@@ -17,7 +17,6 @@ import paddle
...
@@ -17,7 +17,6 @@ import paddle
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.fluid.core
as
core
import
paddle.fluid.core
as
core
import
numpy
as
np
import
numpy
as
np
from
threading
import
Thread
def
user_reader
(
inputs
):
def
user_reader
(
inputs
):
...
...
python/paddle/fluid/tests/unittests/test_qr_op.py
浏览文件 @
a20f7648
...
@@ -17,7 +17,6 @@ import itertools
...
@@ -17,7 +17,6 @@ import itertools
import
numpy
as
np
import
numpy
as
np
import
paddle
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.fluid.layers
as
layers
import
paddle.fluid.core
as
core
import
paddle.fluid.core
as
core
from
op_test
import
OpTest
from
op_test
import
OpTest
...
...
python/paddle/fluid/tests/unittests/test_queue.py
浏览文件 @
a20f7648
...
@@ -13,7 +13,6 @@
...
@@ -13,7 +13,6 @@
# limitations under the License.
# limitations under the License.
import
numpy
as
np
import
numpy
as
np
import
os
import
unittest
import
unittest
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
...
...
python/paddle/fluid/tests/unittests/test_rad2deg.py
浏览文件 @
a20f7648
...
@@ -17,8 +17,6 @@ import numpy as np
...
@@ -17,8 +17,6 @@ import numpy as np
import
paddle
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.fluid.core
as
core
import
paddle.fluid.core
as
core
from
paddle.fluid
import
Program
,
program_guard
from
op_test
import
OpTest
paddle
.
enable_static
()
paddle
.
enable_static
()
...
...
python/paddle/fluid/tests/unittests/test_rand_op.py
浏览文件 @
a20f7648
...
@@ -14,12 +14,11 @@
...
@@ -14,12 +14,11 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
from
op_test
import
OpTest
import
paddle.fluid.core
as
core
import
paddle.fluid.core
as
core
from
paddle
import
rand
from
paddle
import
rand
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
from
paddle.fluid
import
compiler
,
Program
,
program_guard
from
paddle.fluid
import
Program
,
program_guard
import
paddle
import
paddle
...
...
python/paddle/fluid/tests/unittests/test_randint_op.py
浏览文件 @
a20f7648
...
@@ -12,7 +12,6 @@
...
@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
os
import
paddle
import
paddle
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
...
...
python/paddle/fluid/tests/unittests/test_random_crop_op.py
浏览文件 @
a20f7648
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
import
paddle.fluid.core
as
core
from
op_test
import
OpTest
from
op_test
import
OpTest
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
...
...
python/paddle/fluid/tests/unittests/test_random_routing_op.py
浏览文件 @
a20f7648
...
@@ -12,15 +12,10 @@
...
@@ -12,15 +12,10 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
op_test
import
numpy
as
np
import
numpy
as
np
import
unittest
import
unittest
import
paddle
import
paddle
import
paddle.fluid.core
as
core
import
paddle.fluid.core
as
core
from
paddle.fluid.op
import
Operator
import
paddle.fluid
as
fluid
from
paddle.fluid
import
compiler
,
Program
,
program_guard
from
paddle.fluid.backward
import
append_backward
from
paddle.distributed.models.moe
import
utils
from
paddle.distributed.models.moe
import
utils
from
paddle.fluid.framework
import
_test_eager_guard
from
paddle.fluid.framework
import
_test_eager_guard
...
...
python/paddle/fluid/tests/unittests/test_random_seed.py
浏览文件 @
a20f7648
...
@@ -13,7 +13,6 @@
...
@@ -13,7 +13,6 @@
# limitations under the License.
# limitations under the License.
"""Test cloud role maker."""
"""Test cloud role maker."""
import
os
import
unittest
import
unittest
import
paddle.fluid.generator
as
generator
import
paddle.fluid.generator
as
generator
...
...
python/paddle/fluid/tests/unittests/test_randperm_op.py
浏览文件 @
a20f7648
...
@@ -19,7 +19,6 @@ import paddle
...
@@ -19,7 +19,6 @@ import paddle
import
paddle.fluid.core
as
core
import
paddle.fluid.core
as
core
from
paddle.static
import
program_guard
,
Program
from
paddle.static
import
program_guard
,
Program
from
paddle.fluid.framework
import
_test_eager_guard
from
paddle.fluid.framework
import
_test_eager_guard
import
os
def
check_randperm_out
(
n
,
data_np
):
def
check_randperm_out
(
n
,
data_np
):
...
...
python/paddle/fluid/tests/unittests/test_rank_attention_op.py
浏览文件 @
a20f7648
...
@@ -16,9 +16,7 @@ import unittest
...
@@ -16,9 +16,7 @@ import unittest
import
numpy
as
np
import
numpy
as
np
import
random
import
random
from
op_test
import
OpTest
from
op_test
import
OpTest
import
paddle.fluid
as
fluid
from
op_test
import
OpTest
from
paddle.fluid
import
Program
,
program_guard
from
op_test
import
OpTest
,
skip_check_grad_ci
import
paddle.fluid.core
as
core
import
paddle.fluid.core
as
core
...
...
python/paddle/fluid/tests/unittests/test_raw_program_optimizer.py
浏览文件 @
a20f7648
...
@@ -16,7 +16,6 @@ import unittest
...
@@ -16,7 +16,6 @@ import unittest
import
paddle
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.fluid.core
as
core
import
paddle.distributed.fleet
as
fleet
import
paddle.distributed.fleet
as
fleet
import
numpy
as
np
import
numpy
as
np
import
os
import
os
...
...
python/paddle/fluid/tests/unittests/test_reduce_op.py
浏览文件 @
a20f7648
...
@@ -18,7 +18,7 @@ from op_test import OpTest, skip_check_grad_ci, convert_float_to_uint16
...
@@ -18,7 +18,7 @@ from op_test import OpTest, skip_check_grad_ci, convert_float_to_uint16
import
paddle
import
paddle
import
paddle.fluid.core
as
core
import
paddle.fluid.core
as
core
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
from
paddle.fluid
import
compiler
,
Program
,
program_guard
from
paddle.fluid
import
Program
,
program_guard
from
paddle.fluid.framework
import
convert_np_dtype_to_dtype_
from
paddle.fluid.framework
import
convert_np_dtype_to_dtype_
...
...
python/paddle/fluid/tests/unittests/test_reducescatter.py
浏览文件 @
a20f7648
...
@@ -13,7 +13,6 @@
...
@@ -13,7 +13,6 @@
# limitations under the License.
# limitations under the License.
import
unittest
import
unittest
import
numpy
as
np
import
paddle
import
paddle
from
test_collective_base
import
TestDistBase
from
test_collective_base
import
TestDistBase
...
...
python/paddle/fluid/tests/unittests/test_reducescatter_api.py
浏览文件 @
a20f7648
...
@@ -13,7 +13,6 @@
...
@@ -13,7 +13,6 @@
# limitations under the License.
# limitations under the License.
import
unittest
import
unittest
import
numpy
as
np
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle
import
paddle
...
...
python/paddle/fluid/tests/unittests/test_regularizer.py
浏览文件 @
a20f7648
...
@@ -21,7 +21,6 @@ import paddle
...
@@ -21,7 +21,6 @@ import paddle
import
paddle.fluid.core
as
core
import
paddle.fluid.core
as
core
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.fluid.framework
as
framework
import
paddle.fluid.framework
as
framework
import
paddle.fluid.optimizer
as
optimizer
import
paddle.fluid.regularizer
as
regularizer
import
paddle.fluid.regularizer
as
regularizer
from
paddle.fluid.backward
import
append_backward
from
paddle.fluid.backward
import
append_backward
...
...
python/paddle/fluid/tests/unittests/test_regularizer_api.py
浏览文件 @
a20f7648
...
@@ -20,10 +20,6 @@ import random
...
@@ -20,10 +20,6 @@ import random
import
paddle
import
paddle
import
paddle.fluid.core
as
core
import
paddle.fluid.core
as
core
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.fluid.framework
as
framework
import
paddle.fluid.optimizer
as
optimizer
import
paddle.regularizer
as
regularizer
from
paddle.fluid.backward
import
append_backward
def
bow_net
(
data
,
def
bow_net
(
data
,
...
...
python/paddle/fluid/tests/unittests/test_renorm_op.py
浏览文件 @
a20f7648
...
@@ -15,7 +15,6 @@
...
@@ -15,7 +15,6 @@
import
unittest
import
unittest
import
paddle
import
paddle
import
numpy
as
np
import
numpy
as
np
import
paddle.fluid.core
as
core
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
from
paddle.fluid
import
Program
,
program_guard
from
paddle.fluid
import
Program
,
program_guard
...
...
python/paddle/fluid/tests/unittests/test_repeat_interleave_op.py
浏览文件 @
a20f7648
...
@@ -15,7 +15,6 @@
...
@@ -15,7 +15,6 @@
import
unittest
import
unittest
import
paddle
import
paddle
import
numpy
as
np
import
numpy
as
np
import
paddle.fluid.core
as
core
from
op_test
import
OpTest
from
op_test
import
OpTest
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
from
paddle.fluid
import
Program
,
program_guard
from
paddle.fluid
import
Program
,
program_guard
...
...
python/paddle/fluid/tests/unittests/test_reset_grad_inplace_version.py
浏览文件 @
a20f7648
...
@@ -13,9 +13,7 @@
...
@@ -13,9 +13,7 @@
# limitations under the License.
# limitations under the License.
import
numpy
as
np
import
numpy
as
np
import
paddle
import
paddle
import
paddle.fluid
as
fluid
from
paddle
import
_legacy_C_ops
from
paddle
import
_C_ops
,
_legacy_C_ops
from
paddle.fluid
import
framework
from
paddle.fluid.framework
import
_test_eager_guard
from
paddle.fluid.framework
import
_test_eager_guard
import
unittest
import
unittest
...
...
python/paddle/fluid/tests/unittests/test_reshape_op.py
浏览文件 @
a20f7648
...
@@ -18,9 +18,7 @@ import numpy as np
...
@@ -18,9 +18,7 @@ import numpy as np
from
op_test
import
OpTest
,
convert_float_to_uint16
from
op_test
import
OpTest
,
convert_float_to_uint16
import
paddle
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
from
paddle.fluid
import
compiler
from
paddle.static
import
Program
,
program_guard
from
paddle.static
import
Program
,
program_guard
import
paddle.fluid.core
as
core
# situation 1: have shape( list, no tensor), no actual shape(Tensor)
# situation 1: have shape( list, no tensor), no actual shape(Tensor)
...
...
python/paddle/fluid/tests/unittests/test_retinanet_detection_output.py
浏览文件 @
a20f7648
...
@@ -15,10 +15,8 @@
...
@@ -15,10 +15,8 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
import
math
import
math
import
copy
from
op_test
import
OpTest
from
op_test
import
OpTest
from
test_anchor_generator_op
import
anchor_generator_in_python
from
test_anchor_generator_op
import
anchor_generator_in_python
from
test_multiclass_nms_op
import
iou
from
test_multiclass_nms_op
import
nms
from
test_multiclass_nms_op
import
nms
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
from
paddle.fluid
import
Program
,
program_guard
from
paddle.fluid
import
Program
,
program_guard
...
...
python/paddle/fluid/tests/unittests/test_rnn_decode_api.py
浏览文件 @
a20f7648
...
@@ -28,7 +28,6 @@ import paddle.fluid.layers as layers
...
@@ -28,7 +28,6 @@ import paddle.fluid.layers as layers
import
paddle.fluid.core
as
core
import
paddle.fluid.core
as
core
from
paddle.fluid.executor
import
Executor
from
paddle.fluid.executor
import
Executor
from
paddle.fluid
import
framework
from
paddle.fluid.framework
import
_test_eager_guard
from
paddle.fluid.framework
import
_test_eager_guard
paddle
.
enable_static
()
paddle
.
enable_static
()
...
...
python/paddle/fluid/tests/unittests/test_rnn_memory_helper_op.py
浏览文件 @
a20f7648
...
@@ -16,7 +16,6 @@ import unittest
...
@@ -16,7 +16,6 @@ import unittest
from
paddle.fluid.framework
import
Program
from
paddle.fluid.framework
import
Program
from
paddle.fluid.executor
import
Executor
from
paddle.fluid.executor
import
Executor
from
paddle.fluid.backward
import
append_backward
import
numpy
as
np
import
numpy
as
np
import
paddle.fluid.core
as
core
import
paddle.fluid.core
as
core
...
...
python/paddle/fluid/tests/unittests/test_rnn_op.py
浏览文件 @
a20f7648
...
@@ -14,18 +14,15 @@
...
@@ -14,18 +14,15 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
import
math
import
paddle.fluid.core
as
core
import
paddle.fluid.core
as
core
import
paddle
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid.layers
as
layers
import
random
import
random
import
sys
import
sys
from
op_test
import
OpTest
from
op_test
import
OpTest
sys
.
path
.
append
(
"./rnn"
)
sys
.
path
.
append
(
"./rnn"
)
from
rnn_numpy
import
SimpleRNN
,
LSTM
,
GRU
from
rnn_numpy
import
LSTM
from
convert
import
get_params_for_net
from
convert
import
get_params_for_net
random
.
seed
(
2
)
random
.
seed
(
2
)
...
...
python/paddle/fluid/tests/unittests/test_roi_align_op.py
浏览文件 @
a20f7648
...
@@ -16,7 +16,6 @@ import paddle
...
@@ -16,7 +16,6 @@ import paddle
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
import
math
import
math
import
sys
from
op_test
import
OpTest
from
op_test
import
OpTest
...
...
python/paddle/fluid/tests/unittests/test_roi_perspective_transform_op.py
浏览文件 @
a20f7648
...
@@ -14,9 +14,6 @@
...
@@ -14,9 +14,6 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
import
math
import
sys
import
paddle.compat
as
cpt
from
op_test
import
OpTest
from
op_test
import
OpTest
from
math
import
sqrt
from
math
import
sqrt
from
math
import
floor
from
math
import
floor
...
...
python/paddle/fluid/tests/unittests/test_roll_op.py
浏览文件 @
a20f7648
...
@@ -15,7 +15,6 @@
...
@@ -15,7 +15,6 @@
import
unittest
import
unittest
import
paddle
import
paddle
import
numpy
as
np
import
numpy
as
np
import
paddle.fluid.core
as
core
from
op_test
import
OpTest
from
op_test
import
OpTest
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
from
paddle.fluid
import
Program
,
program_guard
from
paddle.fluid
import
Program
,
program_guard
...
...
python/paddle/fluid/tests/unittests/test_rot90_op.py
浏览文件 @
a20f7648
...
@@ -16,8 +16,6 @@ import unittest
...
@@ -16,8 +16,6 @@ import unittest
import
numpy
as
np
import
numpy
as
np
import
paddle
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.fluid.core
as
core
from
paddle.fluid
import
Program
,
program_guard
class
TestRot90_API
(
unittest
.
TestCase
):
class
TestRot90_API
(
unittest
.
TestCase
):
...
...
python/paddle/fluid/tests/unittests/test_rpn_target_assign_op.py
浏览文件 @
a20f7648
...
@@ -15,7 +15,6 @@
...
@@ -15,7 +15,6 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.fluid.core
as
core
from
paddle.fluid
import
Program
,
program_guard
from
paddle.fluid
import
Program
,
program_guard
from
op_test
import
OpTest
from
op_test
import
OpTest
from
test_anchor_generator_op
import
anchor_generator_in_python
from
test_anchor_generator_op
import
anchor_generator_in_python
...
...
python/paddle/fluid/tests/unittests/test_run.py
浏览文件 @
a20f7648
...
@@ -15,8 +15,6 @@
...
@@ -15,8 +15,6 @@
import
unittest
import
unittest
import
subprocess
import
subprocess
import
sys
,
os
import
sys
,
os
import
json
import
shutil
import
tempfile
import
tempfile
import
random
import
random
...
...
python/paddle/fluid/tests/unittests/test_run_program_op.py
浏览文件 @
a20f7648
...
@@ -18,10 +18,10 @@ import numpy as np
...
@@ -18,10 +18,10 @@ import numpy as np
import
six
import
six
import
paddle
import
paddle
from
paddle
import
_
C_ops
,
_
legacy_C_ops
from
paddle
import
_legacy_C_ops
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
from
paddle
import
compat
as
cpt
from
paddle
import
compat
as
cpt
from
paddle.fluid
import
core
,
framework
,
executor
from
paddle.fluid
import
core
,
framework
from
paddle.fluid.layers.utils
import
_hash_with_id
from
paddle.fluid.layers.utils
import
_hash_with_id
from
paddle.fluid.framework
import
_in_eager_mode_
from
paddle.fluid.framework
import
_in_eager_mode_
from
paddle.fluid.executor
import
_is_enable_standalone_executor
,
_is_dy2st_enable_standalone_executor
from
paddle.fluid.executor
import
_is_enable_standalone_executor
,
_is_dy2st_enable_standalone_executor
...
...
python/paddle/fluid/tests/unittests/test_runtime_and_compiletime_exception.py
浏览文件 @
a20f7648
...
@@ -14,10 +14,8 @@
...
@@ -14,10 +14,8 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
from
op_test
import
OpTest
import
paddle
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.fluid.core
as
core
class
TestRunTimeException
(
unittest
.
TestCase
):
class
TestRunTimeException
(
unittest
.
TestCase
):
...
...
python/paddle/fluid/tests/unittests/test_sampling_id_op.py
浏览文件 @
a20f7648
...
@@ -14,11 +14,8 @@
...
@@ -14,11 +14,8 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
from
op_test
import
OpTest
import
paddle.fluid.core
as
core
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
from
paddle.fluid.op
import
Operator
import
paddle
import
paddle
...
...
python/paddle/fluid/tests/unittests/test_save_inference_model_conditional_op.py
浏览文件 @
a20f7648
...
@@ -14,11 +14,9 @@
...
@@ -14,11 +14,9 @@
import
os
import
os
import
unittest
import
unittest
import
numpy
as
np
import
tempfile
import
tempfile
import
paddle
import
paddle
import
paddle.fluid
as
fluid
import
paddle.nn.functional
as
F
import
paddle.nn.functional
as
F
...
...
python/paddle/fluid/tests/unittests/test_save_model_without_var.py
浏览文件 @
a20f7648
...
@@ -12,13 +12,9 @@
...
@@ -12,13 +12,9 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
numpy
as
np
import
warnings
import
warnings
import
unittest
import
unittest
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
from
paddle.fluid.layers.device
import
get_places
from
paddle.fluid.executor
import
as_numpy
class
TestSaveModelWithoutVar
(
unittest
.
TestCase
):
class
TestSaveModelWithoutVar
(
unittest
.
TestCase
):
...
...
python/paddle/fluid/tests/unittests/test_saved_tensors_hooks.py
浏览文件 @
a20f7648
...
@@ -13,7 +13,6 @@
...
@@ -13,7 +13,6 @@
# limitations under the License.
# limitations under the License.
import
unittest
import
unittest
import
numpy
as
np
import
paddle
import
paddle
from
paddle.autograd
import
PyLayer
from
paddle.autograd
import
PyLayer
...
...
python/paddle/fluid/tests/unittests/test_scope.py
浏览文件 @
a20f7648
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
import
paddle.fluid.core
import
paddle.fluid.core
import
unittest
import
unittest
import
six
class
TestScope
(
unittest
.
TestCase
):
class
TestScope
(
unittest
.
TestCase
):
...
...
python/paddle/fluid/tests/unittests/test_searchsorted_op.py
浏览文件 @
a20f7648
...
@@ -16,7 +16,6 @@ import unittest
...
@@ -16,7 +16,6 @@ import unittest
import
numpy
as
np
import
numpy
as
np
from
op_test
import
OpTest
from
op_test
import
OpTest
import
paddle
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid.core
as
core
import
paddle.fluid.core
as
core
paddle
.
enable_static
()
paddle
.
enable_static
()
...
...
python/paddle/fluid/tests/unittests/test_segment_ops.py
浏览文件 @
a20f7648
...
@@ -13,7 +13,6 @@
...
@@ -13,7 +13,6 @@
# limitations under the License.
# limitations under the License.
import
unittest
import
unittest
import
sys
import
numpy
as
np
import
numpy
as
np
import
paddle
import
paddle
...
...
python/paddle/fluid/tests/unittests/test_selu_op.py
浏览文件 @
a20f7648
...
@@ -14,14 +14,11 @@
...
@@ -14,14 +14,11 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
import
six
import
paddle.fluid.core
as
core
import
paddle.fluid.core
as
core
from
op_test
import
OpTest
from
op_test
import
OpTest
import
paddle
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.nn
as
nn
import
paddle.nn.functional
as
F
import
paddle.nn.functional
as
F
from
paddle.fluid
import
compiler
,
Program
,
program_guard
def
ref_selu
(
x
,
def
ref_selu
(
x
,
...
...
python/paddle/fluid/tests/unittests/test_set_value_op.py
浏览文件 @
a20f7648
...
@@ -21,7 +21,7 @@ import paddle
...
@@ -21,7 +21,7 @@ import paddle
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
from
paddle.fluid.layer_helper
import
LayerHelper
from
paddle.fluid.layer_helper
import
LayerHelper
from
functools
import
reduce
from
functools
import
reduce
from
paddle.fluid.framework
import
_test_eager_guard
,
_in_legacy_dygraph
from
paddle.fluid.framework
import
_test_eager_guard
class
TestSetValueBase
(
unittest
.
TestCase
):
class
TestSetValueBase
(
unittest
.
TestCase
):
...
...
python/paddle/fluid/tests/unittests/test_shard_index_op.py
浏览文件 @
a20f7648
...
@@ -14,12 +14,7 @@
...
@@ -14,12 +14,7 @@
import
unittest
import
unittest
import
numpy
as
np
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
from
paddle.fluid.framework
import
Program
,
program_guard
def
common_setup
(
self
,
index_num
,
nshards
,
shard_id
,
ignore_value
):
def
common_setup
(
self
,
index_num
,
nshards
,
shard_id
,
ignore_value
):
...
...
python/paddle/fluid/tests/unittests/test_shrink_rnn_memory.py
浏览文件 @
a20f7648
...
@@ -18,7 +18,7 @@ import paddle.fluid.core as core
...
@@ -18,7 +18,7 @@ import paddle.fluid.core as core
from
paddle.fluid.executor
import
Executor
from
paddle.fluid.executor
import
Executor
import
paddle.fluid.layers
as
layers
import
paddle.fluid.layers
as
layers
from
paddle.fluid.backward
import
append_backward
from
paddle.fluid.backward
import
append_backward
from
paddle.fluid.framework
import
default_main_program
,
switch_main_program
from
paddle.fluid.framework
import
switch_main_program
from
paddle.fluid.framework
import
Program
,
program_guard
from
paddle.fluid.framework
import
Program
,
program_guard
import
numpy
as
np
import
numpy
as
np
...
...
python/paddle/fluid/tests/unittests/test_shuffle_batch_op.py
浏览文件 @
a20f7648
...
@@ -16,11 +16,8 @@
...
@@ -16,11 +16,8 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.fluid.core
as
core
import
paddle.fluid.layers
as
layers
from
op_test
import
OpTest
from
op_test
import
OpTest
import
os
import
os
import
random
class
TestShuffleBatchOpBase
(
OpTest
):
class
TestShuffleBatchOpBase
(
OpTest
):
...
...
python/paddle/fluid/tests/unittests/test_shuffle_channel_op.py
浏览文件 @
a20f7648
...
@@ -14,10 +14,7 @@
...
@@ -14,10 +14,7 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
import
sys
import
math
from
op_test
import
OpTest
from
op_test
import
OpTest
import
paddle.fluid.core
as
core
class
TestShuffleChannelOp
(
OpTest
):
class
TestShuffleChannelOp
(
OpTest
):
...
...
python/paddle/fluid/tests/unittests/test_sigmoid_cross_entropy_with_logits_op.py
浏览文件 @
a20f7648
...
@@ -16,9 +16,8 @@ import numpy as np
...
@@ -16,9 +16,8 @@ import numpy as np
from
op_test
import
OpTest
from
op_test
import
OpTest
from
scipy.special
import
logit
from
scipy.special
import
logit
from
scipy.special
import
expit
from
scipy.special
import
expit
import
paddle.fluid.core
as
core
import
unittest
import
unittest
from
paddle.fluid
import
compiler
,
Program
,
program_guard
from
paddle.fluid
import
Program
,
program_guard
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle
import
paddle
...
...
python/paddle/fluid/tests/unittests/test_sigmoid_focal_loss.py
浏览文件 @
a20f7648
...
@@ -16,8 +16,6 @@ import paddle
...
@@ -16,8 +16,6 @@ import paddle
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
import
numpy
as
np
import
numpy
as
np
import
unittest
import
unittest
from
op_test
import
OpTest
from
test_sigmoid_focal_loss_op
import
sigmoid_focal_loss_forward
from
paddle.fluid.framework
import
_test_eager_guard
from
paddle.fluid.framework
import
_test_eager_guard
...
...
python/paddle/fluid/tests/unittests/test_similarity_focus_op.py
浏览文件 @
a20f7648
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
import
paddle.fluid.core
as
core
from
op_test
import
OpTest
from
op_test
import
OpTest
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
from
paddle.fluid
import
Program
,
program_guard
from
paddle.fluid
import
Program
,
program_guard
...
...
python/paddle/fluid/tests/unittests/test_simple_rnn_op.py
浏览文件 @
a20f7648
...
@@ -14,13 +14,10 @@
...
@@ -14,13 +14,10 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
import
math
from
op_test
import
OpTest
from
op_test
import
OpTest
import
paddle
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid.core
as
core
import
paddle.fluid.core
as
core
import
paddle.fluid.layers
as
layers
import
random
import
random
import
sys
import
sys
...
...
python/paddle/fluid/tests/unittests/test_slice_var.py
浏览文件 @
a20f7648
...
@@ -12,11 +12,9 @@
...
@@ -12,11 +12,9 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import
math
import
unittest
import
unittest
from
paddle.fluid.transpiler.distribute_transpiler
import
slice_variable
from
paddle.fluid.transpiler.distribute_transpiler
import
slice_variable
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.fluid.core
as
core
import
random
import
random
...
...
python/paddle/fluid/tests/unittests/test_softmax2d.py
浏览文件 @
a20f7648
...
@@ -15,7 +15,6 @@
...
@@ -15,7 +15,6 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
import
paddle
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid.core
as
core
import
paddle.fluid.core
as
core
from
test_softmax_op
import
ref_softmax
from
test_softmax_op
import
ref_softmax
...
...
python/paddle/fluid/tests/unittests/test_softmax_op.py
浏览文件 @
a20f7648
...
@@ -16,8 +16,6 @@ import unittest
...
@@ -16,8 +16,6 @@ import unittest
import
numpy
as
np
import
numpy
as
np
from
op_test
import
OpTest
,
convert_float_to_uint16
from
op_test
import
OpTest
,
convert_float_to_uint16
import
paddle.fluid.core
as
core
import
paddle.fluid.core
as
core
import
paddle.fluid
as
fluid
from
paddle.fluid
import
compiler
,
Program
,
program_guard
import
paddle
import
paddle
import
paddle.nn.functional
as
F
import
paddle.nn.functional
as
F
...
...
python/paddle/fluid/tests/unittests/test_solve_op.py
浏览文件 @
a20f7648
...
@@ -616,10 +616,8 @@ class TestSolveOpSingularAPI(unittest.TestCase):
...
@@ -616,10 +616,8 @@ class TestSolveOpSingularAPI(unittest.TestCase):
fetch_list
=
[
result
])
fetch_list
=
[
result
])
except
RuntimeError
as
ex
:
except
RuntimeError
as
ex
:
print
(
"The mat is singular"
)
print
(
"The mat is singular"
)
pass
except
ValueError
as
ex
:
except
ValueError
as
ex
:
print
(
"The mat is singular"
)
print
(
"The mat is singular"
)
pass
def
test_static
(
self
):
def
test_static
(
self
):
for
place
in
self
.
places
:
for
place
in
self
.
places
:
...
@@ -637,10 +635,8 @@ class TestSolveOpSingularAPI(unittest.TestCase):
...
@@ -637,10 +635,8 @@ class TestSolveOpSingularAPI(unittest.TestCase):
result
=
paddle
.
linalg
.
solve
(
input_x
,
input_y
)
result
=
paddle
.
linalg
.
solve
(
input_x
,
input_y
)
except
RuntimeError
as
ex
:
except
RuntimeError
as
ex
:
print
(
"The mat is singular"
)
print
(
"The mat is singular"
)
pass
except
ValueError
as
ex
:
except
ValueError
as
ex
:
print
(
"The mat is singular"
)
print
(
"The mat is singular"
)
pass
def
test_dygraph
(
self
):
def
test_dygraph
(
self
):
with
_test_eager_guard
():
with
_test_eager_guard
():
...
...
python/paddle/fluid/tests/unittests/test_sort_op.py
浏览文件 @
a20f7648
...
@@ -15,9 +15,7 @@
...
@@ -15,9 +15,7 @@
import
unittest
import
unittest
import
paddle
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.fluid.layers
as
layers
import
numpy
as
np
import
numpy
as
np
import
six
import
paddle.fluid.core
as
core
import
paddle.fluid.core
as
core
from
paddle.fluid.framework
import
_test_eager_guard
from
paddle.fluid.framework
import
_test_eager_guard
...
...
python/paddle/fluid/tests/unittests/test_sparse_addmm_op.py
浏览文件 @
a20f7648
...
@@ -14,8 +14,6 @@
...
@@ -14,8 +14,6 @@
import
paddle
import
paddle
import
numpy
as
np
import
numpy
as
np
import
scipy
import
scipy.sparse
as
sp
import
unittest
import
unittest
import
os
import
os
import
re
import
re
...
...
python/paddle/fluid/tests/unittests/test_sparse_attention_op.py
浏览文件 @
a20f7648
...
@@ -16,10 +16,8 @@ import unittest
...
@@ -16,10 +16,8 @@ import unittest
import
numpy
as
np
import
numpy
as
np
from
op_test
import
OpTest
from
op_test
import
OpTest
import
paddle.fluid.core
as
core
import
paddle.fluid.core
as
core
from
paddle.static
import
Program
,
program_guard
import
paddle
import
paddle
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.fluid.framework
as
framework
import
paddle.nn.functional
as
F
import
paddle.nn.functional
as
F
import
os
import
os
import
re
import
re
...
...
python/paddle/fluid/tests/unittests/test_sparse_conv_op.py
浏览文件 @
a20f7648
...
@@ -15,7 +15,6 @@
...
@@ -15,7 +15,6 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
import
paddle
import
paddle
from
paddle
import
_C_ops
,
_legacy_C_ops
from
paddle.fluid
import
core
from
paddle.fluid
import
core
from
paddle.fluid.framework
import
_test_eager_guard
from
paddle.fluid.framework
import
_test_eager_guard
import
paddle.incubate.sparse
as
sparse
import
paddle.incubate.sparse
as
sparse
...
...
python/paddle/fluid/tests/unittests/test_sparse_copy_op.py
浏览文件 @
a20f7648
...
@@ -15,8 +15,6 @@
...
@@ -15,8 +15,6 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
import
paddle
import
paddle
from
paddle
import
_C_ops
,
_legacy_C_ops
from
paddle.fluid
import
core
from
paddle.fluid.framework
import
_test_eager_guard
from
paddle.fluid.framework
import
_test_eager_guard
...
...
python/paddle/fluid/tests/unittests/test_sparse_matmul_op.py
浏览文件 @
a20f7648
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
import
paddle
import
paddle
import
numpy
as
np
import
numpy
as
np
import
scipy
import
scipy.sparse
as
sp
import
scipy.sparse
as
sp
import
unittest
import
unittest
import
os
import
os
...
...
python/paddle/fluid/tests/unittests/test_sparse_momentum_op.py
浏览文件 @
a20f7648
...
@@ -14,11 +14,7 @@
...
@@ -14,11 +14,7 @@
import
unittest
import
unittest
import
numpy
as
np
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
paddle
import
paddle.fluid
as
fluid
def
calculate_sparse_momentum_by_numpy
(
param
,
def
calculate_sparse_momentum_by_numpy
(
param
,
...
...
python/paddle/fluid/tests/unittests/test_sparse_mv_op.py
浏览文件 @
a20f7648
...
@@ -16,8 +16,6 @@ import paddle
...
@@ -16,8 +16,6 @@ import paddle
from
paddle.fluid.framework
import
_test_eager_guard
from
paddle.fluid.framework
import
_test_eager_guard
import
numpy
as
np
import
numpy
as
np
import
scipy
import
scipy.sparse
as
sp
import
unittest
import
unittest
import
os
import
os
import
re
import
re
...
...
python/paddle/fluid/tests/unittests/test_sparse_pooling_op.py
浏览文件 @
a20f7648
...
@@ -15,8 +15,6 @@
...
@@ -15,8 +15,6 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
import
paddle
import
paddle
import
paddle.fluid.core
as
core
from
paddle
import
_C_ops
,
_legacy_C_ops
from
paddle.fluid.framework
import
_test_eager_guard
from
paddle.fluid.framework
import
_test_eager_guard
import
copy
import
copy
...
...
python/paddle/fluid/tests/unittests/test_sparse_softmax_op.py
浏览文件 @
a20f7648
...
@@ -16,12 +16,8 @@ import paddle
...
@@ -16,12 +16,8 @@ import paddle
from
paddle.fluid.framework
import
_test_eager_guard
from
paddle.fluid.framework
import
_test_eager_guard
import
numpy
as
np
import
numpy
as
np
import
scipy
import
scipy.sparse
as
sp
import
scipy.sparse
as
sp
import
unittest
import
unittest
import
os
import
re
import
math
np
.
random
.
seed
(
2022
)
np
.
random
.
seed
(
2022
)
...
...
python/paddle/fluid/tests/unittests/test_sparse_utils_op.py
浏览文件 @
a20f7648
...
@@ -15,7 +15,6 @@
...
@@ -15,7 +15,6 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
import
paddle
import
paddle
from
paddle.incubate
import
sparse
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.fluid.core
as
core
import
paddle.fluid.core
as
core
from
paddle.fluid.framework
import
_test_eager_guard
from
paddle.fluid.framework
import
_test_eager_guard
...
...
python/paddle/fluid/tests/unittests/test_spawn_and_init_parallel_env.py
浏览文件 @
a20f7648
...
@@ -13,7 +13,6 @@
...
@@ -13,7 +13,6 @@
# limitations under the License.
# limitations under the License.
import
os
import
os
import
numpy
as
np
import
unittest
import
unittest
import
paddle
import
paddle
...
...
python/paddle/fluid/tests/unittests/test_spectral_norm_op.py
浏览文件 @
a20f7648
...
@@ -17,7 +17,6 @@ import numpy as np
...
@@ -17,7 +17,6 @@ import numpy as np
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
from
op_test
import
OpTest
,
skip_check_grad_ci
from
op_test
import
OpTest
,
skip_check_grad_ci
from
paddle.fluid
import
core
from
paddle.fluid.framework
import
program_guard
,
Program
from
paddle.fluid.framework
import
program_guard
,
Program
...
...
python/paddle/fluid/tests/unittests/test_split_op.py
浏览文件 @
a20f7648
...
@@ -17,7 +17,7 @@ import unittest
...
@@ -17,7 +17,7 @@ import unittest
import
numpy
as
np
import
numpy
as
np
from
op_test
import
OpTest
,
convert_float_to_uint16
from
op_test
import
OpTest
,
convert_float_to_uint16
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
from
paddle.fluid
import
compiler
,
Program
,
program_guard
,
core
from
paddle.fluid
import
Program
,
core
,
program_guard
from
paddle.fluid.framework
import
_test_eager_guard
from
paddle.fluid.framework
import
_test_eager_guard
...
...
python/paddle/fluid/tests/unittests/test_split_program.py
浏览文件 @
a20f7648
此差异已折叠。
点击以展开。
python/paddle/fluid/tests/unittests/test_splits_api.py
浏览文件 @
a20f7648
此差异已折叠。
点击以展开。
python/paddle/fluid/tests/unittests/test_square_error_cost.py
浏览文件 @
a20f7648
此差异已折叠。
点击以展开。
python/paddle/fluid/tests/unittests/test_squeeze_op.py
浏览文件 @
a20f7648
此差异已折叠。
点击以展开。
python/paddle/fluid/tests/unittests/test_stack_op.py
浏览文件 @
a20f7648
此差异已折叠。
点击以展开。
python/paddle/fluid/tests/unittests/test_static_save_load.py
浏览文件 @
a20f7648
此差异已折叠。
点击以展开。
python/paddle/fluid/tests/unittests/test_static_save_load_large.py
浏览文件 @
a20f7648
此差异已折叠。
点击以展开。
python/paddle/fluid/tests/unittests/test_sum_op.py
浏览文件 @
a20f7648
此差异已折叠。
点击以展开。
python/paddle/fluid/tests/unittests/test_svd_op.py
浏览文件 @
a20f7648
此差异已折叠。
点击以展开。
python/paddle/fluid/tests/unittests/test_take_along_axis_op.py
浏览文件 @
a20f7648
此差异已折叠。
点击以展开。
python/paddle/fluid/tests/unittests/test_tdm_child_op.py
浏览文件 @
a20f7648
此差异已折叠。
点击以展开。
python/paddle/fluid/tests/unittests/test_tdm_sampler_op.py
浏览文件 @
a20f7648
此差异已折叠。
点击以展开。
python/paddle/fluid/tests/unittests/test_teacher_student_sigmoid_loss_op.py
浏览文件 @
a20f7648
此差异已折叠。
点击以展开。
python/paddle/fluid/tests/unittests/test_tensor_array_to_tensor.py
浏览文件 @
a20f7648
此差异已折叠。
点击以展开。
python/paddle/fluid/tests/unittests/test_tensor_fill_diagonal_.py
浏览文件 @
a20f7648
此差异已折叠。
点击以展开。
python/paddle/fluid/tests/unittests/test_tensor_fill_diagonal_tensor.py
浏览文件 @
a20f7648
此差异已折叠。
点击以展开。
python/paddle/fluid/tests/unittests/test_tensor_fill_diagonal_tensor_.py
浏览文件 @
a20f7648
此差异已折叠。
点击以展开。
python/paddle/fluid/tests/unittests/test_tensor_type_promotion.py
浏览文件 @
a20f7648
此差异已折叠。
点击以展开。
python/paddle/fluid/tests/unittests/test_tensordot.py
浏览文件 @
a20f7648
此差异已折叠。
点击以展开。
python/paddle/fluid/tests/unittests/test_tf32_cublas.py
浏览文件 @
a20f7648
此差异已折叠。
点击以展开。
python/paddle/fluid/tests/unittests/test_tf32_cudnn.py
浏览文件 @
a20f7648
此差异已折叠。
点击以展开。
python/paddle/fluid/tests/unittests/test_tile_op.py
浏览文件 @
a20f7648
此差异已折叠。
点击以展开。
python/paddle/fluid/tests/unittests/test_top_k_op.py
浏览文件 @
a20f7648
此差异已折叠。
点击以展开。
python/paddle/fluid/tests/unittests/test_top_k_v2_op.py
浏览文件 @
a20f7648
此差异已折叠。
点击以展开。
python/paddle/fluid/tests/unittests/test_trace_op.py
浏览文件 @
a20f7648
此差异已折叠。
点击以展开。
python/paddle/fluid/tests/unittests/test_trainer_desc.py
浏览文件 @
a20f7648
此差异已折叠。
点击以展开。
python/paddle/fluid/tests/unittests/test_transfer_dtype_op.py
浏览文件 @
a20f7648
此差异已折叠。
点击以展开。
python/paddle/fluid/tests/unittests/test_tril_indices_op.py
浏览文件 @
a20f7648
此差异已折叠。
点击以展开。
python/paddle/fluid/tests/unittests/test_triu_indices_op.py
浏览文件 @
a20f7648
此差异已折叠。
点击以展开。
python/paddle/fluid/tests/unittests/test_trunc_op.py
浏览文件 @
a20f7648
此差异已折叠。
点击以展开。
python/paddle/fluid/tests/unittests/test_truncated_gaussian_random_op.py
浏览文件 @
a20f7648
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录