Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DS小龙哥
Paddle
提交
bde090a9
P
Paddle
项目概览
DS小龙哥
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
0
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
bde090a9
编写于
2月 24, 2018
作者:
L
Luo Tao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
replace paddle.v2.fluid by paddle.fluid in tests
上级
f7fa7c57
变更
119
隐藏空白更改
内联
并排
Showing
119 changed file
with
285 addition
and
285 deletion
+285
-285
python/paddle/fluid/backward.py
python/paddle/fluid/backward.py
+1
-1
python/paddle/fluid/default_scope_funcs.py
python/paddle/fluid/default_scope_funcs.py
+3
-3
python/paddle/fluid/io.py
python/paddle/fluid/io.py
+2
-2
python/paddle/fluid/layer_helper.py
python/paddle/fluid/layer_helper.py
+1
-1
python/paddle/fluid/net_drawer.py
python/paddle/fluid/net_drawer.py
+2
-2
python/paddle/fluid/op.py
python/paddle/fluid/op.py
+2
-2
python/paddle/fluid/tests/book/notest_rnn_encoder_decoer.py
python/paddle/fluid/tests/book/notest_rnn_encoder_decoer.py
+5
-5
python/paddle/fluid/tests/book/test_fit_a_line.py
python/paddle/fluid/tests/book/test_fit_a_line.py
+1
-1
python/paddle/fluid/tests/book/test_image_classification.py
python/paddle/fluid/tests/book/test_image_classification.py
+1
-1
python/paddle/fluid/tests/book/test_label_semantic_roles.py
python/paddle/fluid/tests/book/test_label_semantic_roles.py
+2
-2
python/paddle/fluid/tests/book/test_machine_translation.py
python/paddle/fluid/tests/book/test_machine_translation.py
+4
-4
python/paddle/fluid/tests/book/test_recognize_digits.py
python/paddle/fluid/tests/book/test_recognize_digits.py
+1
-1
python/paddle/fluid/tests/book/test_recommender_system.py
python/paddle/fluid/tests/book/test_recommender_system.py
+6
-6
python/paddle/fluid/tests/book/test_understand_sentiment.py
python/paddle/fluid/tests/book/test_understand_sentiment.py
+1
-1
python/paddle/fluid/tests/book/test_word2vec.py
python/paddle/fluid/tests/book/test_word2vec.py
+1
-1
python/paddle/fluid/tests/book_distribute/notest_dist_fit_a_line.py
...dle/fluid/tests/book_distribute/notest_dist_fit_a_line.py
+1
-1
python/paddle/fluid/tests/book_distribute/notest_dist_image_classification.py
...tests/book_distribute/notest_dist_image_classification.py
+1
-1
python/paddle/fluid/tests/book_distribute/notest_dist_label_semantic_roles.py
...tests/book_distribute/notest_dist_label_semantic_roles.py
+1
-1
python/paddle/fluid/tests/book_distribute/notest_dist_word2vec.py
...addle/fluid/tests/book_distribute/notest_dist_word2vec.py
+1
-1
python/paddle/fluid/tests/book_distribute/notest_machine_translation.py
...fluid/tests/book_distribute/notest_machine_translation.py
+5
-5
python/paddle/fluid/tests/book_distribute/notest_recognize_digits_conv_dist.py
...ests/book_distribute/notest_recognize_digits_conv_dist.py
+1
-1
python/paddle/fluid/tests/book_distribute/notest_recognize_digits_mlp_dist.py
...tests/book_distribute/notest_recognize_digits_mlp_dist.py
+1
-1
python/paddle/fluid/tests/book_distribute/notest_recommender_system_dist.py
...d/tests/book_distribute/notest_recommender_system_dist.py
+5
-5
python/paddle/fluid/tests/book_distribute/notest_understand_sentiment_conv_dist.py
.../book_distribute/notest_understand_sentiment_conv_dist.py
+1
-1
python/paddle/fluid/tests/book_distribute/notest_understand_sentiment_dynamic_lstm.py
...ok_distribute/notest_understand_sentiment_dynamic_lstm.py
+1
-1
python/paddle/fluid/tests/book_memory_optimization/test_memopt_fit_a_line.py
.../tests/book_memory_optimization/test_memopt_fit_a_line.py
+1
-1
python/paddle/fluid/tests/book_memory_optimization/test_memopt_image_classification_train.py
...ry_optimization/test_memopt_image_classification_train.py
+1
-1
python/paddle/fluid/tests/book_memory_optimization/test_memopt_machine_translation.py
...ok_memory_optimization/test_memopt_machine_translation.py
+5
-5
python/paddle/fluid/tests/demo/fc_gan.py
python/paddle/fluid/tests/demo/fc_gan.py
+1
-1
python/paddle/fluid/tests/notest_concurrency.py
python/paddle/fluid/tests/notest_concurrency.py
+3
-3
python/paddle/fluid/tests/notest_csp.py
python/paddle/fluid/tests/notest_csp.py
+1
-1
python/paddle/fluid/tests/test_cpp_reader.py
python/paddle/fluid/tests/test_cpp_reader.py
+1
-1
python/paddle/fluid/tests/test_data_feeder.py
python/paddle/fluid/tests/test_data_feeder.py
+1
-1
python/paddle/fluid/tests/test_detection.py
python/paddle/fluid/tests/test_detection.py
+3
-3
python/paddle/fluid/tests/test_error_clip.py
python/paddle/fluid/tests/test_error_clip.py
+1
-1
python/paddle/fluid/tests/test_gradient_clip.py
python/paddle/fluid/tests/test_gradient_clip.py
+1
-1
python/paddle/fluid/tests/test_mnist_if_else_op.py
python/paddle/fluid/tests/test_mnist_if_else_op.py
+5
-5
python/paddle/fluid/tests/test_python_operator_overriding.py
python/paddle/fluid/tests/test_python_operator_overriding.py
+3
-3
python/paddle/fluid/tests/unittests/decorators.py
python/paddle/fluid/tests/unittests/decorators.py
+1
-1
python/paddle/fluid/tests/unittests/op_test.py
python/paddle/fluid/tests/unittests/op_test.py
+5
-5
python/paddle/fluid/tests/unittests/test_adagrad_op.py
python/paddle/fluid/tests/unittests/test_adagrad_op.py
+2
-2
python/paddle/fluid/tests/unittests/test_adam_op.py
python/paddle/fluid/tests/unittests/test_adam_op.py
+2
-2
python/paddle/fluid/tests/unittests/test_array_read_write_op.py
.../paddle/fluid/tests/unittests/test_array_read_write_op.py
+5
-5
python/paddle/fluid/tests/unittests/test_assign_value_op.py
python/paddle/fluid/tests/unittests/test_assign_value_op.py
+3
-3
python/paddle/fluid/tests/unittests/test_batch_norm_op.py
python/paddle/fluid/tests/unittests/test_batch_norm_op.py
+3
-3
python/paddle/fluid/tests/unittests/test_beam_search_decode_op.py
...addle/fluid/tests/unittests/test_beam_search_decode_op.py
+2
-2
python/paddle/fluid/tests/unittests/test_beam_search_op.py
python/paddle/fluid/tests/unittests/test_beam_search_op.py
+2
-2
python/paddle/fluid/tests/unittests/test_calc_gradient.py
python/paddle/fluid/tests/unittests/test_calc_gradient.py
+5
-5
python/paddle/fluid/tests/unittests/test_cast_op.py
python/paddle/fluid/tests/unittests/test_cast_op.py
+1
-1
python/paddle/fluid/tests/unittests/test_cond_op.py
python/paddle/fluid/tests/unittests/test_cond_op.py
+2
-2
python/paddle/fluid/tests/unittests/test_conditional_block.py
...on/paddle/fluid/tests/unittests/test_conditional_block.py
+5
-5
python/paddle/fluid/tests/unittests/test_const_value.py
python/paddle/fluid/tests/unittests/test_const_value.py
+1
-1
python/paddle/fluid/tests/unittests/test_conv2d_op.py
python/paddle/fluid/tests/unittests/test_conv2d_op.py
+1
-1
python/paddle/fluid/tests/unittests/test_conv2d_transpose_op.py
.../paddle/fluid/tests/unittests/test_conv2d_transpose_op.py
+1
-1
python/paddle/fluid/tests/unittests/test_conv3d_op.py
python/paddle/fluid/tests/unittests/test_conv3d_op.py
+1
-1
python/paddle/fluid/tests/unittests/test_conv3d_transpose_op.py
.../paddle/fluid/tests/unittests/test_conv3d_transpose_op.py
+1
-1
python/paddle/fluid/tests/unittests/test_create_op_doc_string.py
...paddle/fluid/tests/unittests/test_create_op_doc_string.py
+1
-1
python/paddle/fluid/tests/unittests/test_default_scope_funcs.py
.../paddle/fluid/tests/unittests/test_default_scope_funcs.py
+1
-1
python/paddle/fluid/tests/unittests/test_dyn_rnn.py
python/paddle/fluid/tests/unittests/test_dyn_rnn.py
+1
-1
python/paddle/fluid/tests/unittests/test_dynrnn_gradient_check.py
...addle/fluid/tests/unittests/test_dynrnn_gradient_check.py
+1
-1
python/paddle/fluid/tests/unittests/test_dynrnn_static_input.py
.../paddle/fluid/tests/unittests/test_dynrnn_static_input.py
+5
-5
python/paddle/fluid/tests/unittests/test_exception.py
python/paddle/fluid/tests/unittests/test_exception.py
+1
-1
python/paddle/fluid/tests/unittests/test_executor_and_mul.py
python/paddle/fluid/tests/unittests/test_executor_and_mul.py
+3
-3
python/paddle/fluid/tests/unittests/test_feed_fetch_method.py
...on/paddle/fluid/tests/unittests/test_feed_fetch_method.py
+1
-1
python/paddle/fluid/tests/unittests/test_fetch_var.py
python/paddle/fluid/tests/unittests/test_fetch_var.py
+2
-2
python/paddle/fluid/tests/unittests/test_fill_op.py
python/paddle/fluid/tests/unittests/test_fill_op.py
+1
-1
python/paddle/fluid/tests/unittests/test_framework_debug_str.py
.../paddle/fluid/tests/unittests/test_framework_debug_str.py
+1
-1
python/paddle/fluid/tests/unittests/test_gaussian_random_op.py
...n/paddle/fluid/tests/unittests/test_gaussian_random_op.py
+4
-4
python/paddle/fluid/tests/unittests/test_get_places_op.py
python/paddle/fluid/tests/unittests/test_get_places_op.py
+1
-1
python/paddle/fluid/tests/unittests/test_image_classification_layer.py
.../fluid/tests/unittests/test_image_classification_layer.py
+3
-3
python/paddle/fluid/tests/unittests/test_infer_shape.py
python/paddle/fluid/tests/unittests/test_infer_shape.py
+1
-1
python/paddle/fluid/tests/unittests/test_inference_model_io.py
...n/paddle/fluid/tests/unittests/test_inference_model_io.py
+6
-6
python/paddle/fluid/tests/unittests/test_initializer.py
python/paddle/fluid/tests/unittests/test_initializer.py
+2
-2
python/paddle/fluid/tests/unittests/test_is_empty_op.py
python/paddle/fluid/tests/unittests/test_is_empty_op.py
+2
-2
python/paddle/fluid/tests/unittests/test_layer_norm_op.py
python/paddle/fluid/tests/unittests/test_layer_norm_op.py
+3
-3
python/paddle/fluid/tests/unittests/test_layers.py
python/paddle/fluid/tests/unittests/test_layers.py
+4
-4
python/paddle/fluid/tests/unittests/test_learning_rate_decay.py
.../paddle/fluid/tests/unittests/test_learning_rate_decay.py
+4
-4
python/paddle/fluid/tests/unittests/test_lod_array_length_op.py
.../paddle/fluid/tests/unittests/test_lod_array_length_op.py
+3
-3
python/paddle/fluid/tests/unittests/test_lod_rank_table.py
python/paddle/fluid/tests/unittests/test_lod_rank_table.py
+3
-3
python/paddle/fluid/tests/unittests/test_lod_tensor_array.py
python/paddle/fluid/tests/unittests/test_lod_tensor_array.py
+1
-1
python/paddle/fluid/tests/unittests/test_lod_tensor_array_ops.py
...paddle/fluid/tests/unittests/test_lod_tensor_array_ops.py
+5
-5
python/paddle/fluid/tests/unittests/test_math_op_patch.py
python/paddle/fluid/tests/unittests/test_math_op_patch.py
+1
-1
python/paddle/fluid/tests/unittests/test_memory_optimization_transpiler.py
...id/tests/unittests/test_memory_optimization_transpiler.py
+4
-4
python/paddle/fluid/tests/unittests/test_multihead_attention.py
.../paddle/fluid/tests/unittests/test_multihead_attention.py
+2
-2
python/paddle/fluid/tests/unittests/test_net.py
python/paddle/fluid/tests/unittests/test_net.py
+2
-2
python/paddle/fluid/tests/unittests/test_normalization_wrapper.py
...addle/fluid/tests/unittests/test_normalization_wrapper.py
+2
-2
python/paddle/fluid/tests/unittests/test_one_hot_op.py
python/paddle/fluid/tests/unittests/test_one_hot_op.py
+4
-4
python/paddle/fluid/tests/unittests/test_op_support_gpu.py
python/paddle/fluid/tests/unittests/test_op_support_gpu.py
+1
-1
python/paddle/fluid/tests/unittests/test_operator.py
python/paddle/fluid/tests/unittests/test_operator.py
+2
-2
python/paddle/fluid/tests/unittests/test_operator_desc.py
python/paddle/fluid/tests/unittests/test_operator_desc.py
+2
-2
python/paddle/fluid/tests/unittests/test_optimizer.py
python/paddle/fluid/tests/unittests/test_optimizer.py
+3
-3
python/paddle/fluid/tests/unittests/test_parallel_op.py
python/paddle/fluid/tests/unittests/test_parallel_op.py
+1
-1
python/paddle/fluid/tests/unittests/test_parameter.py
python/paddle/fluid/tests/unittests/test_parameter.py
+5
-5
python/paddle/fluid/tests/unittests/test_pool2d_op.py
python/paddle/fluid/tests/unittests/test_pool2d_op.py
+1
-1
python/paddle/fluid/tests/unittests/test_pool3d_op.py
python/paddle/fluid/tests/unittests/test_pool3d_op.py
+1
-1
python/paddle/fluid/tests/unittests/test_print_op.py
python/paddle/fluid/tests/unittests/test_print_op.py
+6
-6
python/paddle/fluid/tests/unittests/test_profiler.py
python/paddle/fluid/tests/unittests/test_profiler.py
+4
-4
python/paddle/fluid/tests/unittests/test_program.py
python/paddle/fluid/tests/unittests/test_program.py
+2
-2
python/paddle/fluid/tests/unittests/test_protobuf.py
python/paddle/fluid/tests/unittests/test_protobuf.py
+1
-1
python/paddle/fluid/tests/unittests/test_protobuf_descs.py
python/paddle/fluid/tests/unittests/test_protobuf_descs.py
+1
-1
python/paddle/fluid/tests/unittests/test_recurrent_op.py
python/paddle/fluid/tests/unittests/test_recurrent_op.py
+5
-5
python/paddle/fluid/tests/unittests/test_recv_op.py
python/paddle/fluid/tests/unittests/test_recv_op.py
+2
-2
python/paddle/fluid/tests/unittests/test_registry.py
python/paddle/fluid/tests/unittests/test_registry.py
+1
-1
python/paddle/fluid/tests/unittests/test_regularizer.py
python/paddle/fluid/tests/unittests/test_regularizer.py
+4
-4
python/paddle/fluid/tests/unittests/test_reorder_lod_tensor.py
...n/paddle/fluid/tests/unittests/test_reorder_lod_tensor.py
+2
-2
python/paddle/fluid/tests/unittests/test_rnn_memory_helper_op.py
...paddle/fluid/tests/unittests/test_rnn_memory_helper_op.py
+4
-4
python/paddle/fluid/tests/unittests/test_scope.py
python/paddle/fluid/tests/unittests/test_scope.py
+5
-5
python/paddle/fluid/tests/unittests/test_selected_rows.py
python/paddle/fluid/tests/unittests/test_selected_rows.py
+1
-1
python/paddle/fluid/tests/unittests/test_sgd_op.py
python/paddle/fluid/tests/unittests/test_sgd_op.py
+2
-2
python/paddle/fluid/tests/unittests/test_shrink_rnn_memory.py
...on/paddle/fluid/tests/unittests/test_shrink_rnn_memory.py
+6
-6
python/paddle/fluid/tests/unittests/test_split_and_merge_lod_tensor_op.py
...uid/tests/unittests/test_split_and_merge_lod_tensor_op.py
+5
-5
python/paddle/fluid/tests/unittests/test_split_selected_rows_op.py
...ddle/fluid/tests/unittests/test_split_selected_rows_op.py
+2
-2
python/paddle/fluid/tests/unittests/test_split_var.py
python/paddle/fluid/tests/unittests/test_split_var.py
+3
-3
python/paddle/fluid/tests/unittests/test_switch.py
python/paddle/fluid/tests/unittests/test_switch.py
+5
-5
python/paddle/fluid/tests/unittests/test_tensor.py
python/paddle/fluid/tests/unittests/test_tensor.py
+1
-1
python/paddle/fluid/tests/unittests/test_unique_name.py
python/paddle/fluid/tests/unittests/test_unique_name.py
+1
-1
python/paddle/fluid/tests/unittests/test_variable.py
python/paddle/fluid/tests/unittests/test_variable.py
+2
-2
python/paddle/fluid/tests/unittests/test_weight_normalization.py
...paddle/fluid/tests/unittests/test_weight_normalization.py
+4
-4
python/paddle/fluid/tests/unittests/test_while_op.py
python/paddle/fluid/tests/unittests/test_while_op.py
+4
-4
未找到文件。
python/paddle/fluid/backward.py
浏览文件 @
bde090a9
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
# 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.
from
paddle.
v2.
fluid
import
framework
as
framework
from
paddle.fluid
import
framework
as
framework
from
.
import
core
from
.
import
core
import
collections
import
collections
import
copy
import
copy
...
...
python/paddle/fluid/default_scope_funcs.py
浏览文件 @
bde090a9
...
@@ -26,7 +26,7 @@ A `scoped_function` will take a `function` as input. That function will be
...
@@ -26,7 +26,7 @@ A `scoped_function` will take a `function` as input. That function will be
invoked in a new local scope.
invoked in a new local scope.
"""
"""
import
paddle.
v2.
fluid.core
import
paddle.fluid.core
import
threading
import
threading
__tl_scope__
=
threading
.
local
()
__tl_scope__
=
threading
.
local
()
...
@@ -44,13 +44,13 @@ __all__ = [
...
@@ -44,13 +44,13 @@ __all__ = [
def
get_cur_scope
():
def
get_cur_scope
():
"""
"""
Get current scope.
Get current scope.
:rtype: paddle.
v2.
fluid.core.Scope
:rtype: paddle.fluid.core.Scope
"""
"""
cur_scope_stack
=
getattr
(
__tl_scope__
,
'cur_scope'
,
None
)
cur_scope_stack
=
getattr
(
__tl_scope__
,
'cur_scope'
,
None
)
if
cur_scope_stack
is
None
:
if
cur_scope_stack
is
None
:
__tl_scope__
.
cur_scope
=
list
()
__tl_scope__
.
cur_scope
=
list
()
if
len
(
__tl_scope__
.
cur_scope
)
==
0
:
if
len
(
__tl_scope__
.
cur_scope
)
==
0
:
__tl_scope__
.
cur_scope
.
append
(
paddle
.
v2
.
fluid
.
core
.
Scope
())
__tl_scope__
.
cur_scope
.
append
(
paddle
.
fluid
.
core
.
Scope
())
return
__tl_scope__
.
cur_scope
[
-
1
]
return
__tl_scope__
.
cur_scope
[
-
1
]
...
...
python/paddle/fluid/io.py
浏览文件 @
bde090a9
...
@@ -14,8 +14,8 @@
...
@@ -14,8 +14,8 @@
import
os
import
os
from
paddle.
v2.
fluid.evaluator
import
Evaluator
from
paddle.fluid.evaluator
import
Evaluator
from
paddle.
v2.
fluid.framework
import
Program
,
Parameter
,
default_main_program
,
Variable
from
paddle.fluid.framework
import
Program
,
Parameter
,
default_main_program
,
Variable
from
.
import
core
from
.
import
core
__all__
=
[
__all__
=
[
...
...
python/paddle/fluid/layer_helper.py
浏览文件 @
bde090a9
...
@@ -17,7 +17,7 @@ import itertools
...
@@ -17,7 +17,7 @@ import itertools
from
framework
import
Variable
,
Parameter
,
default_main_program
,
default_startup_program
,
dtype_is_floating
from
framework
import
Variable
,
Parameter
,
default_main_program
,
default_startup_program
,
dtype_is_floating
import
unique_name
import
unique_name
from
paddle.
v2.
fluid.initializer
import
Constant
,
Xavier
from
paddle.fluid.initializer
import
Constant
,
Xavier
from
param_attr
import
ParamAttr
,
WeightNormParamAttr
from
param_attr
import
ParamAttr
,
WeightNormParamAttr
...
...
python/paddle/fluid/net_drawer.py
浏览文件 @
bde090a9
...
@@ -17,8 +17,8 @@ import json
...
@@ -17,8 +17,8 @@ import json
import
logging
import
logging
from
collections
import
defaultdict
from
collections
import
defaultdict
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
import
paddle.
v2.
fluid.proto.framework_pb2
as
framework_pb2
import
paddle.fluid.proto.framework_pb2
as
framework_pb2
logger
=
logging
.
getLogger
(
__name__
)
logger
=
logging
.
getLogger
(
__name__
)
logger
.
setLevel
(
logging
.
INFO
)
logger
.
setLevel
(
logging
.
INFO
)
...
...
python/paddle/fluid/op.py
浏览文件 @
bde090a9
...
@@ -12,8 +12,8 @@
...
@@ -12,8 +12,8 @@
# 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.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
import
paddle.
v2.
fluid.proto.framework_pb2
as
framework_pb2
import
paddle.fluid.proto.framework_pb2
as
framework_pb2
def
get_all_op_protos
():
def
get_all_op_protos
():
...
...
python/paddle/fluid/tests/book/notest_rnn_encoder_decoer.py
浏览文件 @
bde090a9
...
@@ -14,15 +14,15 @@
...
@@ -14,15 +14,15 @@
import
numpy
as
np
import
numpy
as
np
import
paddle.v2
as
paddle
import
paddle.v2
as
paddle
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
import
paddle.
v2.
fluid.framework
as
framework
import
paddle.fluid.framework
as
framework
import
paddle.
v2.
fluid.layers
as
layers
import
paddle.fluid.layers
as
layers
import
contextlib
import
contextlib
import
math
import
math
import
sys
import
sys
import
unittest
import
unittest
from
paddle.
v2.
fluid.executor
import
Executor
from
paddle.fluid.executor
import
Executor
dict_size
=
30000
dict_size
=
30000
source_dict_dim
=
target_dict_dim
=
dict_size
source_dict_dim
=
target_dict_dim
=
dict_size
...
...
python/paddle/fluid/tests/book/test_fit_a_line.py
浏览文件 @
bde090a9
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
# limitations under the License.
# limitations under the License.
import
paddle.v2
as
paddle
import
paddle.v2
as
paddle
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
contextlib
import
contextlib
import
numpy
import
numpy
import
unittest
import
unittest
...
...
python/paddle/fluid/tests/book/test_image_classification.py
浏览文件 @
bde090a9
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
from
__future__
import
print_function
from
__future__
import
print_function
import
paddle.v2
as
paddle
import
paddle.v2
as
paddle
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
contextlib
import
contextlib
import
math
import
math
import
sys
import
sys
...
...
python/paddle/fluid/tests/book/test_label_semantic_roles.py
浏览文件 @
bde090a9
...
@@ -17,8 +17,8 @@ import math
...
@@ -17,8 +17,8 @@ import math
import
numpy
as
np
import
numpy
as
np
import
paddle.v2
as
paddle
import
paddle.v2
as
paddle
import
paddle.v2.dataset.conll05
as
conll05
import
paddle.v2.dataset.conll05
as
conll05
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
from
paddle.
v2.
fluid.initializer
import
init_on_cpu
from
paddle.fluid.initializer
import
init_on_cpu
import
contextlib
import
contextlib
import
time
import
time
import
unittest
import
unittest
...
...
python/paddle/fluid/tests/book/test_machine_translation.py
浏览文件 @
bde090a9
...
@@ -15,10 +15,10 @@ import contextlib
...
@@ -15,10 +15,10 @@ import contextlib
import
numpy
as
np
import
numpy
as
np
import
paddle.v2
as
paddle
import
paddle.v2
as
paddle
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.
v2.
fluid.framework
as
framework
import
paddle.fluid.framework
as
framework
import
paddle.
v2.
fluid.layers
as
pd
import
paddle.fluid.layers
as
pd
from
paddle.
v2.
fluid.executor
import
Executor
from
paddle.fluid.executor
import
Executor
import
unittest
import
unittest
dict_size
=
30000
dict_size
=
30000
...
...
python/paddle/fluid/tests/book/test_recognize_digits.py
浏览文件 @
bde090a9
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
# limitations under the License.
# limitations under the License.
from
__future__
import
print_function
from
__future__
import
print_function
import
argparse
import
argparse
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.v2
as
paddle
import
paddle.v2
as
paddle
import
sys
import
sys
import
numpy
import
numpy
...
...
python/paddle/fluid/tests/book/test_recommender_system.py
浏览文件 @
bde090a9
...
@@ -16,12 +16,12 @@ import math
...
@@ -16,12 +16,12 @@ import math
import
sys
import
sys
import
numpy
as
np
import
numpy
as
np
import
paddle.v2
as
paddle
import
paddle.v2
as
paddle
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.
v2.
fluid.framework
as
framework
import
paddle.fluid.framework
as
framework
import
paddle.
v2.
fluid.layers
as
layers
import
paddle.fluid.layers
as
layers
import
paddle.
v2.
fluid.nets
as
nets
import
paddle.fluid.nets
as
nets
from
paddle.
v2.
fluid.executor
import
Executor
from
paddle.fluid.executor
import
Executor
from
paddle.
v2.
fluid.optimizer
import
SGDOptimizer
from
paddle.fluid.optimizer
import
SGDOptimizer
IS_SPARSE
=
True
IS_SPARSE
=
True
USE_GPU
=
False
USE_GPU
=
False
...
...
python/paddle/fluid/tests/book/test_understand_sentiment.py
浏览文件 @
bde090a9
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
from
__future__
import
print_function
from
__future__
import
print_function
import
unittest
import
unittest
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.v2
as
paddle
import
paddle.v2
as
paddle
import
contextlib
import
contextlib
import
math
import
math
...
...
python/paddle/fluid/tests/book/test_word2vec.py
浏览文件 @
bde090a9
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
# limitations under the License.
# limitations under the License.
import
paddle.v2
as
paddle
import
paddle.v2
as
paddle
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
unittest
import
unittest
import
os
import
os
import
numpy
as
np
import
numpy
as
np
...
...
python/paddle/fluid/tests/book_distribute/notest_dist_fit_a_line.py
浏览文件 @
bde090a9
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
import
numpy
as
np
import
numpy
as
np
import
paddle.v2
as
paddle
import
paddle.v2
as
paddle
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
os
import
os
x
=
fluid
.
layers
.
data
(
name
=
'x'
,
shape
=
[
13
],
dtype
=
'float32'
)
x
=
fluid
.
layers
.
data
(
name
=
'x'
,
shape
=
[
13
],
dtype
=
'float32'
)
...
...
python/paddle/fluid/tests/book_distribute/notest_dist_image_classification.py
浏览文件 @
bde090a9
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
from
__future__
import
print_function
from
__future__
import
print_function
import
paddle.v2
as
paddle
import
paddle.v2
as
paddle
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
os
import
os
import
sys
import
sys
...
...
python/paddle/fluid/tests/book_distribute/notest_dist_label_semantic_roles.py
浏览文件 @
bde090a9
...
@@ -17,7 +17,7 @@ import math
...
@@ -17,7 +17,7 @@ import math
import
numpy
as
np
import
numpy
as
np
import
paddle.v2
as
paddle
import
paddle.v2
as
paddle
import
paddle.v2.dataset.conll05
as
conll05
import
paddle.v2.dataset.conll05
as
conll05
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
time
import
time
import
os
import
os
...
...
python/paddle/fluid/tests/book_distribute/notest_dist_word2vec.py
浏览文件 @
bde090a9
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
from
__future__
import
print_function
from
__future__
import
print_function
import
numpy
as
np
import
numpy
as
np
import
paddle.v2
as
paddle
import
paddle.v2
as
paddle
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
os
import
os
PASS_NUM
=
100
PASS_NUM
=
100
...
...
python/paddle/fluid/tests/book_distribute/notest_machine_translation.py
浏览文件 @
bde090a9
...
@@ -14,11 +14,11 @@
...
@@ -14,11 +14,11 @@
import
numpy
as
np
import
numpy
as
np
import
paddle.v2
as
paddle
import
paddle.v2
as
paddle
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
import
paddle.
v2.
fluid.framework
as
framework
import
paddle.fluid.framework
as
framework
import
paddle.
v2.
fluid.layers
as
layers
import
paddle.fluid.layers
as
layers
from
paddle.
v2.
fluid.executor
import
Executor
from
paddle.fluid.executor
import
Executor
import
os
import
os
dict_size
=
30000
dict_size
=
30000
...
...
python/paddle/fluid/tests/book_distribute/notest_recognize_digits_conv_dist.py
浏览文件 @
bde090a9
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
from
__future__
import
print_function
from
__future__
import
print_function
import
numpy
as
np
import
numpy
as
np
import
paddle.v2
as
paddle
import
paddle.v2
as
paddle
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
os
import
os
images
=
fluid
.
layers
.
data
(
name
=
'pixel'
,
shape
=
[
1
,
28
,
28
],
dtype
=
'float32'
)
images
=
fluid
.
layers
.
data
(
name
=
'pixel'
,
shape
=
[
1
,
28
,
28
],
dtype
=
'float32'
)
...
...
python/paddle/fluid/tests/book_distribute/notest_recognize_digits_mlp_dist.py
浏览文件 @
bde090a9
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
from
__future__
import
print_function
from
__future__
import
print_function
import
numpy
as
np
import
numpy
as
np
import
paddle.v2
as
paddle
import
paddle.v2
as
paddle
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
os
import
os
BATCH_SIZE
=
128
BATCH_SIZE
=
128
...
...
python/paddle/fluid/tests/book_distribute/notest_recommender_system_dist.py
浏览文件 @
bde090a9
...
@@ -15,11 +15,11 @@
...
@@ -15,11 +15,11 @@
import
numpy
as
np
import
numpy
as
np
import
os
import
os
import
paddle.v2
as
paddle
import
paddle.v2
as
paddle
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
import
paddle.
v2.
fluid.layers
as
layers
import
paddle.fluid.layers
as
layers
import
paddle.
v2.
fluid.nets
as
nets
import
paddle.fluid.nets
as
nets
from
paddle.
v2.
fluid.optimizer
import
SGDOptimizer
from
paddle.fluid.optimizer
import
SGDOptimizer
IS_SPARSE
=
True
IS_SPARSE
=
True
BATCH_SIZE
=
256
BATCH_SIZE
=
256
...
...
python/paddle/fluid/tests/book_distribute/notest_understand_sentiment_conv_dist.py
浏览文件 @
bde090a9
...
@@ -16,7 +16,7 @@ from __future__ import print_function
...
@@ -16,7 +16,7 @@ from __future__ import print_function
import
os
import
os
import
numpy
as
np
import
numpy
as
np
import
paddle.v2
as
paddle
import
paddle.v2
as
paddle
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
def
convolution_net
(
data
,
label
,
input_dim
,
class_dim
=
2
,
emb_dim
=
32
,
def
convolution_net
(
data
,
label
,
input_dim
,
class_dim
=
2
,
emb_dim
=
32
,
...
...
python/paddle/fluid/tests/book_distribute/notest_understand_sentiment_dynamic_lstm.py
浏览文件 @
bde090a9
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
import
numpy
as
np
import
numpy
as
np
import
os
import
os
import
paddle.v2
as
paddle
import
paddle.v2
as
paddle
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
def
stacked_lstm_net
(
data
,
def
stacked_lstm_net
(
data
,
...
...
python/paddle/fluid/tests/book_memory_optimization/test_memopt_fit_a_line.py
浏览文件 @
bde090a9
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
import
numpy
as
np
import
numpy
as
np
import
paddle.v2
as
paddle
import
paddle.v2
as
paddle
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
math
import
math
import
sys
import
sys
...
...
python/paddle/fluid/tests/book_memory_optimization/test_memopt_image_classification_train.py
浏览文件 @
bde090a9
...
@@ -17,7 +17,7 @@ from __future__ import print_function
...
@@ -17,7 +17,7 @@ from __future__ import print_function
import
sys
import
sys
import
paddle.v2
as
paddle
import
paddle.v2
as
paddle
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
math
import
math
import
sys
import
sys
...
...
python/paddle/fluid/tests/book_memory_optimization/test_memopt_machine_translation.py
浏览文件 @
bde090a9
...
@@ -14,11 +14,11 @@
...
@@ -14,11 +14,11 @@
import
numpy
as
np
import
numpy
as
np
import
paddle.v2
as
paddle
import
paddle.v2
as
paddle
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
import
paddle.
v2.
fluid.framework
as
framework
import
paddle.fluid.framework
as
framework
import
paddle.
v2.
fluid.layers
as
layers
import
paddle.fluid.layers
as
layers
from
paddle.
v2.
fluid.executor
import
Executor
from
paddle.fluid.executor
import
Executor
import
math
import
math
import
sys
import
sys
...
...
python/paddle/fluid/tests/demo/fc_gan.py
浏览文件 @
bde090a9
...
@@ -20,7 +20,7 @@ import matplotlib
...
@@ -20,7 +20,7 @@ import matplotlib
import
numpy
import
numpy
import
paddle.v2
as
paddle
import
paddle.v2
as
paddle
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
matplotlib
.
use
(
'Agg'
)
matplotlib
.
use
(
'Agg'
)
import
matplotlib.pyplot
as
plt
import
matplotlib.pyplot
as
plt
...
...
python/paddle/fluid/tests/notest_concurrency.py
浏览文件 @
bde090a9
...
@@ -13,9 +13,9 @@
...
@@ -13,9 +13,9 @@
# limitations under the License.
# limitations under the License.
import
unittest
import
unittest
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
from
paddle.
v2.
fluid.executor
import
Executor
from
paddle.fluid.executor
import
Executor
class
TestRoutineOp
(
unittest
.
TestCase
):
class
TestRoutineOp
(
unittest
.
TestCase
):
...
...
python/paddle/fluid/tests/notest_csp.py
浏览文件 @
bde090a9
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
# limitations under the License.
# limitations under the License.
import
unittest
import
unittest
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
class
TestCSPFramework
(
unittest
.
TestCase
):
class
TestCSPFramework
(
unittest
.
TestCase
):
...
...
python/paddle/fluid/tests/test_cpp_reader.py
浏览文件 @
bde090a9
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
# limitations under the License.
# limitations under the License.
import
paddle.v2
as
paddle
import
paddle.v2
as
paddle
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
numpy
as
np
import
numpy
as
np
prog
=
fluid
.
framework
.
Program
()
prog
=
fluid
.
framework
.
Program
()
...
...
python/paddle/fluid/tests/test_data_feeder.py
浏览文件 @
bde090a9
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
# 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.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
def
test_converter
():
def
test_converter
():
...
...
python/paddle/fluid/tests/test_detection.py
浏览文件 @
bde090a9
...
@@ -13,9 +13,9 @@
...
@@ -13,9 +13,9 @@
# limitations under the License.
# limitations under the License.
from
__future__
import
print_function
from
__future__
import
print_function
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.
v2.
fluid.layers
as
layers
import
paddle.fluid.layers
as
layers
from
paddle.
v2.
fluid.framework
import
Program
,
program_guard
from
paddle.fluid.framework
import
Program
,
program_guard
import
unittest
import
unittest
...
...
python/paddle/fluid/tests/test_error_clip.py
浏览文件 @
bde090a9
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
from
__future__
import
print_function
from
__future__
import
print_function
import
numpy
as
np
import
numpy
as
np
import
paddle.v2
as
paddle
import
paddle.v2
as
paddle
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
BATCH_SIZE
=
128
BATCH_SIZE
=
128
CLIP_MAX
=
2e-6
CLIP_MAX
=
2e-6
...
...
python/paddle/fluid/tests/test_gradient_clip.py
浏览文件 @
bde090a9
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
import
numpy
as
np
import
numpy
as
np
import
paddle.v2
as
paddle
import
paddle.v2
as
paddle
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
BATCH_SIZE
=
128
BATCH_SIZE
=
128
CLIP
=
1
CLIP
=
1
...
...
python/paddle/fluid/tests/test_mnist_if_else_op.py
浏览文件 @
bde090a9
...
@@ -12,11 +12,11 @@
...
@@ -12,11 +12,11 @@
# 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.
v2.
fluid.layers
as
layers
import
paddle.fluid.layers
as
layers
from
paddle.
v2.
fluid.framework
import
Program
,
program_guard
,
default_main_program
,
default_startup_program
from
paddle.fluid.framework
import
Program
,
program_guard
,
default_main_program
,
default_startup_program
from
paddle.
v2.
fluid.executor
import
Executor
from
paddle.fluid.executor
import
Executor
from
paddle.
v2.
fluid.optimizer
import
MomentumOptimizer
from
paddle.fluid.optimizer
import
MomentumOptimizer
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
import
paddle.v2
as
paddle
import
paddle.v2
as
paddle
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
...
...
python/paddle/fluid/tests/test_python_operator_overriding.py
浏览文件 @
bde090a9
...
@@ -16,9 +16,9 @@ import unittest
...
@@ -16,9 +16,9 @@ import unittest
import
numpy
as
np
import
numpy
as
np
import
paddle.
v2.
fluid.layers
as
layers
import
paddle.fluid.layers
as
layers
import
paddle.
v2.
fluid.framework
as
framework
import
paddle.fluid.framework
as
framework
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
class
TestPythonOperatorOverride
(
unittest
.
TestCase
):
class
TestPythonOperatorOverride
(
unittest
.
TestCase
):
...
...
python/paddle/fluid/tests/unittests/decorators.py
浏览文件 @
bde090a9
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
# 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.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
__all__
=
[
'many_times'
,
'prog_scope'
]
__all__
=
[
'many_times'
,
'prog_scope'
]
...
...
python/paddle/fluid/tests/unittests/op_test.py
浏览文件 @
bde090a9
...
@@ -16,12 +16,12 @@ import unittest
...
@@ -16,12 +16,12 @@ import unittest
import
numpy
as
np
import
numpy
as
np
import
random
import
random
import
itertools
import
itertools
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
import
collections
import
collections
from
paddle.
v2.
fluid.backward
import
append_backward
from
paddle.fluid.backward
import
append_backward
from
paddle.
v2.
fluid.op
import
Operator
from
paddle.fluid.op
import
Operator
from
paddle.
v2.
fluid.executor
import
Executor
from
paddle.fluid.executor
import
Executor
from
paddle.
v2.
fluid.framework
import
Program
,
OpProtoHolder
from
paddle.fluid.framework
import
Program
,
OpProtoHolder
def
randomize_probability
(
batch_size
,
class_num
,
dtype
=
'float32'
):
def
randomize_probability
(
batch_size
,
class_num
,
dtype
=
'float32'
):
...
...
python/paddle/fluid/tests/unittests/test_adagrad_op.py
浏览文件 @
bde090a9
...
@@ -14,8 +14,8 @@
...
@@ -14,8 +14,8 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
from
paddle.
v2.
fluid.op
import
Operator
from
paddle.fluid.op
import
Operator
from
op_test
import
OpTest
from
op_test
import
OpTest
import
math
import
math
...
...
python/paddle/fluid/tests/unittests/test_adam_op.py
浏览文件 @
bde090a9
...
@@ -15,8 +15,8 @@
...
@@ -15,8 +15,8 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
from
op_test
import
OpTest
from
op_test
import
OpTest
from
paddle.
v2.
fluid
import
core
from
paddle.fluid
import
core
from
paddle.
v2.
fluid.op
import
Operator
from
paddle.fluid.op
import
Operator
class
TestAdamOp1
(
OpTest
):
class
TestAdamOp1
(
OpTest
):
...
...
python/paddle/fluid/tests/unittests/test_array_read_write_op.py
浏览文件 @
bde090a9
...
@@ -13,11 +13,11 @@
...
@@ -13,11 +13,11 @@
# limitations under the License.
# limitations under the License.
import
unittest
import
unittest
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
import
paddle.
v2.
fluid.layers
as
layers
import
paddle.fluid.layers
as
layers
from
paddle.
v2.
fluid.executor
import
Executor
from
paddle.fluid.executor
import
Executor
from
paddle.
v2.
fluid.backward
import
append_backward
from
paddle.fluid.backward
import
append_backward
from
paddle.
v2.
fluid.framework
import
default_main_program
from
paddle.fluid.framework
import
default_main_program
import
numpy
import
numpy
...
...
python/paddle/fluid/tests/unittests/test_assign_value_op.py
浏览文件 @
bde090a9
...
@@ -12,12 +12,12 @@
...
@@ -12,12 +12,12 @@
# 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.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.
v2.
fluid.layers
as
layers
import
paddle.fluid.layers
as
layers
import
op_test
import
op_test
import
numpy
import
numpy
import
unittest
import
unittest
import
paddle.
v2.
fluid.framework
as
framework
import
paddle.fluid.framework
as
framework
class
TestAssignValueOp
(
op_test
.
OpTest
):
class
TestAssignValueOp
(
op_test
.
OpTest
):
...
...
python/paddle/fluid/tests/unittests/test_batch_norm_op.py
浏览文件 @
bde090a9
...
@@ -15,9 +15,9 @@
...
@@ -15,9 +15,9 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
from
op_test
import
OpTest
from
op_test
import
OpTest
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
from
paddle.
v2.
fluid.op
import
Operator
from
paddle.fluid.op
import
Operator
from
paddle.
v2.
fluid.framework
import
grad_var_name
from
paddle.fluid.framework
import
grad_var_name
def
get_backward_op
(
scope
,
op
,
no_grad_set
):
def
get_backward_op
(
scope
,
op
,
no_grad_set
):
...
...
python/paddle/fluid/tests/unittests/test_beam_search_decode_op.py
浏览文件 @
bde090a9
...
@@ -15,8 +15,8 @@
...
@@ -15,8 +15,8 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
from
paddle.
v2.
fluid.op
import
Operator
from
paddle.fluid.op
import
Operator
class
TestBeamSearchDecodeOp
(
unittest
.
TestCase
):
class
TestBeamSearchDecodeOp
(
unittest
.
TestCase
):
...
...
python/paddle/fluid/tests/unittests/test_beam_search_op.py
浏览文件 @
bde090a9
...
@@ -13,8 +13,8 @@
...
@@ -13,8 +13,8 @@
# limitations under the License.
# limitations under the License.
import
logging
import
logging
from
paddle.
v2.
fluid.op
import
Operator
,
DynamicRecurrentOp
from
paddle.fluid.op
import
Operator
,
DynamicRecurrentOp
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
...
...
python/paddle/fluid/tests/unittests/test_calc_gradient.py
浏览文件 @
bde090a9
...
@@ -14,11 +14,11 @@
...
@@ -14,11 +14,11 @@
import
unittest
import
unittest
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.
v2.
fluid.layers
as
layers
import
paddle.fluid.layers
as
layers
import
paddle.
v2.
fluid.framework
as
framework
import
paddle.fluid.framework
as
framework
import
paddle.
v2.
fluid.optimizer
as
optimizer
import
paddle.fluid.optimizer
as
optimizer
from
paddle.
v2.
fluid.backward
import
calc_gradient
from
paddle.fluid.backward
import
calc_gradient
class
TestCalcGradient
(
unittest
.
TestCase
):
class
TestCalcGradient
(
unittest
.
TestCase
):
...
...
python/paddle/fluid/tests/unittests/test_cast_op.py
浏览文件 @
bde090a9
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
import
op_test
import
op_test
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
class
TestCastOp
(
op_test
.
OpTest
):
class
TestCastOp
(
op_test
.
OpTest
):
...
...
python/paddle/fluid/tests/unittests/test_cond_op.py
浏览文件 @
bde090a9
...
@@ -13,10 +13,10 @@
...
@@ -13,10 +13,10 @@
# limitations under the License.
# limitations under the License.
import
logging
import
logging
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
from
paddle.
v2.
fluid.op
import
Operator
,
CondOp
from
paddle.fluid.op
import
Operator
,
CondOp
class
PySimpleCond
(
object
):
class
PySimpleCond
(
object
):
...
...
python/paddle/fluid/tests/unittests/test_conditional_block.py
浏览文件 @
bde090a9
...
@@ -13,11 +13,11 @@
...
@@ -13,11 +13,11 @@
# limitations under the License.
# limitations under the License.
import
unittest
import
unittest
import
paddle.
v2.
fluid.layers
as
layers
import
paddle.fluid.layers
as
layers
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
from
paddle.
v2.
fluid.framework
import
default_startup_program
,
default_main_program
from
paddle.fluid.framework
import
default_startup_program
,
default_main_program
from
paddle.
v2.
fluid.executor
import
Executor
from
paddle.fluid.executor
import
Executor
from
paddle.
v2.
fluid.backward
import
append_backward
from
paddle.fluid.backward
import
append_backward
import
numpy
import
numpy
...
...
python/paddle/fluid/tests/unittests/test_const_value.py
浏览文件 @
bde090a9
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
# limitations under the License.
# limitations under the License.
import
unittest
import
unittest
import
paddle.
v2.
fluid.framework
as
framework
import
paddle.fluid.framework
as
framework
class
ConditionalBlock
(
unittest
.
TestCase
):
class
ConditionalBlock
(
unittest
.
TestCase
):
...
...
python/paddle/fluid/tests/unittests/test_conv2d_op.py
浏览文件 @
bde090a9
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
import
paddle.
v2.
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_conv2d_transpose_op.py
浏览文件 @
bde090a9
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
import
paddle.
v2.
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_conv3d_op.py
浏览文件 @
bde090a9
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
import
paddle.
v2.
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_conv3d_transpose_op.py
浏览文件 @
bde090a9
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
import
paddle.
v2.
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_create_op_doc_string.py
浏览文件 @
bde090a9
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
# limitations under the License.
# limitations under the License.
import
unittest
import
unittest
import
paddle.
v2.
fluid.layers
as
layers
import
paddle.fluid.layers
as
layers
class
TestDocString
(
unittest
.
TestCase
):
class
TestDocString
(
unittest
.
TestCase
):
...
...
python/paddle/fluid/tests/unittests/test_default_scope_funcs.py
浏览文件 @
bde090a9
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
# 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.
from
paddle.
v2.
fluid.default_scope_funcs
import
*
from
paddle.fluid.default_scope_funcs
import
*
import
unittest
import
unittest
...
...
python/paddle/fluid/tests/unittests/test_dyn_rnn.py
浏览文件 @
bde090a9
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
# 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.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.v2
as
paddle
import
paddle.v2
as
paddle
import
unittest
import
unittest
import
numpy
import
numpy
...
...
python/paddle/fluid/tests/unittests/test_dynrnn_gradient_check.py
浏览文件 @
bde090a9
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
import
numpy
import
numpy
import
random
import
random
import
collections
import
collections
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
unittest
import
unittest
from
decorators
import
*
from
decorators
import
*
...
...
python/paddle/fluid/tests/unittests/test_dynrnn_static_input.py
浏览文件 @
bde090a9
...
@@ -14,11 +14,11 @@
...
@@ -14,11 +14,11 @@
import
unittest
import
unittest
import
paddle.v2
as
paddle
import
paddle.v2
as
paddle
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
from
paddle.
v2.
fluid.backward
import
append_backward
from
paddle.fluid.backward
import
append_backward
import
paddle.
v2.
fluid.framework
as
framework
import
paddle.fluid.framework
as
framework
from
paddle.
v2.
fluid.framework
import
Program
,
switch_main_program
from
paddle.fluid.framework
import
Program
,
switch_main_program
import
bisect
import
bisect
import
numpy
as
np
import
numpy
as
np
...
...
python/paddle/fluid/tests/unittests/test_exception.py
浏览文件 @
bde090a9
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
# 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.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
import
unittest
import
unittest
...
...
python/paddle/fluid/tests/unittests/test_executor_and_mul.py
浏览文件 @
bde090a9
...
@@ -15,10 +15,10 @@
...
@@ -15,10 +15,10 @@
import
unittest
import
unittest
import
numpy
import
numpy
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
from
paddle.
v2.
fluid.executor
import
Executor
from
paddle.fluid.executor
import
Executor
from
paddle.
v2.
fluid.layers
import
mul
,
data
from
paddle.fluid.layers
import
mul
,
data
class
TestExecutor
(
unittest
.
TestCase
):
class
TestExecutor
(
unittest
.
TestCase
):
...
...
python/paddle/fluid/tests/unittests/test_feed_fetch_method.py
浏览文件 @
bde090a9
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
# 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.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
...
...
python/paddle/fluid/tests/unittests/test_fetch_var.py
浏览文件 @
bde090a9
...
@@ -12,8 +12,8 @@
...
@@ -12,8 +12,8 @@
# 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.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.
v2.
fluid.layers
as
layers
import
paddle.fluid.layers
as
layers
import
op_test
import
op_test
import
numpy
import
numpy
import
unittest
import
unittest
...
...
python/paddle/fluid/tests/unittests/test_fill_op.py
浏览文件 @
bde090a9
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
from
op_test
import
OpTest
from
op_test
import
OpTest
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
class
TestFillOp
(
OpTest
):
class
TestFillOp
(
OpTest
):
...
...
python/paddle/fluid/tests/unittests/test_framework_debug_str.py
浏览文件 @
bde090a9
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
# limitations under the License.
# limitations under the License.
import
unittest
import
unittest
from
paddle.
v2.
fluid.framework
import
Program
from
paddle.fluid.framework
import
Program
class
TestDebugStringFramework
(
unittest
.
TestCase
):
class
TestDebugStringFramework
(
unittest
.
TestCase
):
...
...
python/paddle/fluid/tests/unittests/test_gaussian_random_op.py
浏览文件 @
bde090a9
...
@@ -15,10 +15,10 @@
...
@@ -15,10 +15,10 @@
import
unittest
import
unittest
import
numpy
import
numpy
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
from
paddle.
v2.
fluid.op
import
Operator
from
paddle.fluid.op
import
Operator
from
paddle.
v2.
fluid.executor
import
Executor
from
paddle.fluid.executor
import
Executor
class
TestGaussianRandomOp
(
unittest
.
TestCase
):
class
TestGaussianRandomOp
(
unittest
.
TestCase
):
...
...
python/paddle/fluid/tests/unittests/test_get_places_op.py
浏览文件 @
bde090a9
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
# 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.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
decorators
import
decorators
import
unittest
import
unittest
...
...
python/paddle/fluid/tests/unittests/test_image_classification_layer.py
浏览文件 @
bde090a9
...
@@ -14,9 +14,9 @@
...
@@ -14,9 +14,9 @@
import
unittest
import
unittest
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.
v2.
fluid.nets
as
nets
import
paddle.fluid.nets
as
nets
from
paddle.
v2.
fluid.framework
import
Program
from
paddle.fluid.framework
import
Program
def
conv_block
(
input
,
num_filter
,
groups
,
dropouts
):
def
conv_block
(
input
,
num_filter
,
groups
,
dropouts
):
...
...
python/paddle/fluid/tests/unittests/test_infer_shape.py
浏览文件 @
bde090a9
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
import
unittest
import
unittest
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
class
TestInferShape
(
unittest
.
TestCase
):
class
TestInferShape
(
unittest
.
TestCase
):
...
...
python/paddle/fluid/tests/unittests/test_inference_model_io.py
浏览文件 @
bde090a9
...
@@ -15,13 +15,13 @@
...
@@ -15,13 +15,13 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
import
paddle.
v2.
fluid.executor
as
executor
import
paddle.fluid.executor
as
executor
import
paddle.
v2.
fluid.layers
as
layers
import
paddle.fluid.layers
as
layers
import
paddle.
v2.
fluid.optimizer
as
optimizer
import
paddle.fluid.optimizer
as
optimizer
from
paddle.
v2.
fluid.framework
import
Program
,
program_guard
from
paddle.fluid.framework
import
Program
,
program_guard
from
paddle.
v2.
fluid.io
import
save_inference_model
,
load_inference_model
from
paddle.fluid.io
import
save_inference_model
,
load_inference_model
class
TestBook
(
unittest
.
TestCase
):
class
TestBook
(
unittest
.
TestCase
):
...
...
python/paddle/fluid/tests/unittests/test_initializer.py
浏览文件 @
bde090a9
...
@@ -15,8 +15,8 @@
...
@@ -15,8 +15,8 @@
import
numpy
as
np
import
numpy
as
np
import
unittest
import
unittest
import
paddle.
v2.
fluid.framework
as
framework
import
paddle.fluid.framework
as
framework
import
paddle.
v2.
fluid.initializer
as
initializer
import
paddle.fluid.initializer
as
initializer
DELTA
=
0.00001
DELTA
=
0.00001
...
...
python/paddle/fluid/tests/unittests/test_is_empty_op.py
浏览文件 @
bde090a9
...
@@ -14,8 +14,8 @@
...
@@ -14,8 +14,8 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
from
paddle.
v2.
fluid.op
import
Operator
from
paddle.fluid.op
import
Operator
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
def
create_tensor
(
scope
,
name
,
np_data
):
def
create_tensor
(
scope
,
name
,
np_data
):
...
...
python/paddle/fluid/tests/unittests/test_layer_norm_op.py
浏览文件 @
bde090a9
...
@@ -16,9 +16,9 @@ import numpy as np
...
@@ -16,9 +16,9 @@ import numpy as np
from
operator
import
mul
from
operator
import
mul
from
op_test
import
OpTest
from
op_test
import
OpTest
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
from
paddle.
v2.
fluid.op
import
Operator
from
paddle.fluid.op
import
Operator
from
paddle.
v2.
fluid.framework
import
grad_var_name
from
paddle.fluid.framework
import
grad_var_name
np
.
random
.
random
(
123
)
np
.
random
.
random
(
123
)
...
...
python/paddle/fluid/tests/unittests/test_layers.py
浏览文件 @
bde090a9
...
@@ -15,10 +15,10 @@
...
@@ -15,10 +15,10 @@
from
__future__
import
print_function
from
__future__
import
print_function
import
unittest
import
unittest
import
paddle.
v2.
fluid.layers
as
layers
import
paddle.fluid.layers
as
layers
import
paddle.
v2.
fluid.nets
as
nets
import
paddle.fluid.nets
as
nets
from
paddle.
v2.
fluid.framework
import
Program
,
program_guard
,
default_main_program
from
paddle.fluid.framework
import
Program
,
program_guard
,
default_main_program
from
paddle.
v2.
fluid.param_attr
import
ParamAttr
from
paddle.fluid.param_attr
import
ParamAttr
import
decorators
import
decorators
...
...
python/paddle/fluid/tests/unittests/test_learning_rate_decay.py
浏览文件 @
bde090a9
...
@@ -17,10 +17,10 @@ import unittest
...
@@ -17,10 +17,10 @@ import unittest
import
math
import
math
import
copy
import
copy
import
paddle.
v2.
fluid.framework
as
framework
import
paddle.fluid.framework
as
framework
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.
v2.
fluid.layers
as
layers
import
paddle.fluid.layers
as
layers
import
paddle.
v2.
fluid.learning_rate_decay
as
lr_decay
import
paddle.fluid.learning_rate_decay
as
lr_decay
def
exponential_decay
(
learning_rate
,
def
exponential_decay
(
learning_rate
,
...
...
python/paddle/fluid/tests/unittests/test_lod_array_length_op.py
浏览文件 @
bde090a9
...
@@ -13,9 +13,9 @@
...
@@ -13,9 +13,9 @@
# limitations under the License.
# limitations under the License.
import
unittest
import
unittest
import
paddle.
v2.
fluid.layers
as
layers
import
paddle.fluid.layers
as
layers
from
paddle.
v2.
fluid.executor
import
Executor
from
paddle.fluid.executor
import
Executor
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
import
numpy
import
numpy
...
...
python/paddle/fluid/tests/unittests/test_lod_rank_table.py
浏览文件 @
bde090a9
...
@@ -12,9 +12,9 @@
...
@@ -12,9 +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.
from
paddle.
v2.
fluid.layers
import
lod_rank_table
,
data
from
paddle.fluid.layers
import
lod_rank_table
,
data
from
paddle.
v2.
fluid.executor
import
Executor
from
paddle.fluid.executor
import
Executor
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
import
numpy
import
numpy
import
unittest
import
unittest
...
...
python/paddle/fluid/tests/unittests/test_lod_tensor_array.py
浏览文件 @
bde090a9
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
# limitations under the License.
# limitations under the License.
import
unittest
import
unittest
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
import
numpy
import
numpy
...
...
python/paddle/fluid/tests/unittests/test_lod_tensor_array_ops.py
浏览文件 @
bde090a9
...
@@ -13,12 +13,12 @@
...
@@ -13,12 +13,12 @@
# limitations under the License.
# limitations under the License.
import
unittest
import
unittest
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
import
numpy
import
numpy
import
paddle.
v2.
fluid.layers
as
layers
import
paddle.fluid.layers
as
layers
from
paddle.
v2.
fluid.framework
import
Program
,
program_guard
from
paddle.fluid.framework
import
Program
,
program_guard
from
paddle.
v2.
fluid.executor
import
Executor
from
paddle.fluid.executor
import
Executor
from
paddle.
v2.
fluid.backward
import
append_backward
from
paddle.fluid.backward
import
append_backward
class
TestCPULoDTensorArrayOps
(
unittest
.
TestCase
):
class
TestCPULoDTensorArrayOps
(
unittest
.
TestCase
):
...
...
python/paddle/fluid/tests/unittests/test_math_op_patch.py
浏览文件 @
bde090a9
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
import
unittest
import
unittest
import
decorators
import
decorators
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
numpy
import
numpy
...
...
python/paddle/fluid/tests/unittests/test_memory_optimization_transpiler.py
浏览文件 @
bde090a9
...
@@ -15,10 +15,10 @@
...
@@ -15,10 +15,10 @@
from
__future__
import
print_function
from
__future__
import
print_function
import
unittest
import
unittest
import
paddle.
v2.
fluid.layers
as
layers
import
paddle.fluid.layers
as
layers
import
paddle.
v2.
fluid.optimizer
as
optimizer
import
paddle.fluid.optimizer
as
optimizer
from
paddle.
v2.
fluid.framework
import
Program
,
program_guard
from
paddle.fluid.framework
import
Program
,
program_guard
from
paddle.
v2.
fluid.memory_optimization_transpiler
import
memory_optimize
from
paddle.fluid.memory_optimization_transpiler
import
memory_optimize
class
TestControlFlowGraph
(
unittest
.
TestCase
):
class
TestControlFlowGraph
(
unittest
.
TestCase
):
...
...
python/paddle/fluid/tests/unittests/test_multihead_attention.py
浏览文件 @
bde090a9
...
@@ -13,8 +13,8 @@
...
@@ -13,8 +13,8 @@
# limitations under the License.
# limitations under the License.
import
unittest
import
unittest
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
import
numpy
as
np
import
numpy
as
np
...
...
python/paddle/fluid/tests/unittests/test_net.py
浏览文件 @
bde090a9
...
@@ -12,8 +12,8 @@
...
@@ -12,8 +12,8 @@
# 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.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
from
paddle.
v2.
fluid.op
import
Operator
from
paddle.fluid.op
import
Operator
import
unittest
import
unittest
...
...
python/paddle/fluid/tests/unittests/test_normalization_wrapper.py
浏览文件 @
bde090a9
...
@@ -13,8 +13,8 @@
...
@@ -13,8 +13,8 @@
# limitations under the License.
# limitations under the License.
import
unittest
import
unittest
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
import
numpy
as
np
import
numpy
as
np
...
...
python/paddle/fluid/tests/unittests/test_one_hot_op.py
浏览文件 @
bde090a9
...
@@ -16,10 +16,10 @@ import unittest
...
@@ -16,10 +16,10 @@ import unittest
import
numpy
as
np
import
numpy
as
np
import
math
import
math
from
op_test
import
OpTest
from
op_test
import
OpTest
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
import
paddle.
v2.
fluid.framework
as
framework
import
paddle.fluid.framework
as
framework
from
paddle.
v2.
fluid.framework
import
Program
,
program_guard
from
paddle.fluid.framework
import
Program
,
program_guard
class
TestOneHotOp
(
OpTest
):
class
TestOneHotOp
(
OpTest
):
...
...
python/paddle/fluid/tests/unittests/test_op_support_gpu.py
浏览文件 @
bde090a9
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
# limitations under the License.
# limitations under the License.
import
unittest
import
unittest
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
class
TestOpSupportGPU
(
unittest
.
TestCase
):
class
TestOpSupportGPU
(
unittest
.
TestCase
):
...
...
python/paddle/fluid/tests/unittests/test_operator.py
浏览文件 @
bde090a9
...
@@ -14,8 +14,8 @@
...
@@ -14,8 +14,8 @@
import
unittest
import
unittest
import
paddle.
v2.
fluid.op
as
op
import
paddle.fluid.op
as
op
import
paddle.
v2.
fluid.proto.framework_pb2
as
framework_pb2
import
paddle.fluid.proto.framework_pb2
as
framework_pb2
class
TestGetAllProtos
(
unittest
.
TestCase
):
class
TestGetAllProtos
(
unittest
.
TestCase
):
...
...
python/paddle/fluid/tests/unittests/test_operator_desc.py
浏览文件 @
bde090a9
...
@@ -14,9 +14,9 @@
...
@@ -14,9 +14,9 @@
import
unittest
import
unittest
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
from
paddle.
v2.
fluid.framework
import
Program
,
default_startup_program
from
paddle.fluid.framework
import
Program
,
default_startup_program
main_program
=
default_startup_program
()
main_program
=
default_startup_program
()
...
...
python/paddle/fluid/tests/unittests/test_optimizer.py
浏览文件 @
bde090a9
...
@@ -14,9 +14,9 @@
...
@@ -14,9 +14,9 @@
import
unittest
import
unittest
import
paddle.
v2.
fluid.framework
as
framework
import
paddle.fluid.framework
as
framework
import
paddle.
v2.
fluid.optimizer
as
optimizer
import
paddle.fluid.optimizer
as
optimizer
from
paddle.
v2.
fluid.backward
import
append_backward
from
paddle.fluid.backward
import
append_backward
class
TestOptimizer
(
unittest
.
TestCase
):
class
TestOptimizer
(
unittest
.
TestCase
):
...
...
python/paddle/fluid/tests/unittests/test_parallel_op.py
浏览文件 @
bde090a9
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
import
unittest
import
unittest
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
numpy
import
numpy
...
...
python/paddle/fluid/tests/unittests/test_parameter.py
浏览文件 @
bde090a9
...
@@ -13,11 +13,11 @@
...
@@ -13,11 +13,11 @@
# limitations under the License.
# limitations under the License.
import
unittest
import
unittest
from
paddle.
v2.
fluid.framework
import
default_main_program
from
paddle.fluid.framework
import
default_main_program
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
from
paddle.
v2.
fluid.executor
import
Executor
from
paddle.fluid.executor
import
Executor
import
paddle.
v2.
fluid.io
as
io
import
paddle.fluid.io
as
io
from
paddle.
v2.
fluid.initializer
import
ConstantInitializer
from
paddle.fluid.initializer
import
ConstantInitializer
import
numpy
as
np
import
numpy
as
np
main_program
=
default_main_program
()
main_program
=
default_main_program
()
...
...
python/paddle/fluid/tests/unittests/test_pool2d_op.py
浏览文件 @
bde090a9
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
import
paddle.
v2.
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_pool3d_op.py
浏览文件 @
bde090a9
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
import
paddle.
v2.
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_print_op.py
浏览文件 @
bde090a9
...
@@ -13,12 +13,12 @@
...
@@ -13,12 +13,12 @@
# limitations under the License.
# limitations under the License.
import
unittest
import
unittest
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
from
paddle.
v2.
fluid.executor
import
Executor
from
paddle.fluid.executor
import
Executor
import
paddle.
v2.
fluid.layers
as
layers
import
paddle.fluid.layers
as
layers
from
paddle.
v2.
fluid.backward
import
append_backward
from
paddle.fluid.backward
import
append_backward
from
paddle.
v2.
fluid.framework
import
switch_main_program
from
paddle.fluid.framework
import
switch_main_program
from
paddle.
v2.
fluid.framework
import
Program
from
paddle.fluid.framework
import
Program
import
numpy
as
np
import
numpy
as
np
...
...
python/paddle/fluid/tests/unittests/test_profiler.py
浏览文件 @
bde090a9
...
@@ -15,10 +15,10 @@
...
@@ -15,10 +15,10 @@
import
unittest
import
unittest
import
os
import
os
import
numpy
as
np
import
numpy
as
np
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.
v2.
fluid.profiler
as
profiler
import
paddle.fluid.profiler
as
profiler
import
paddle.
v2.
fluid.layers
as
layers
import
paddle.fluid.layers
as
layers
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
class
TestProfiler
(
unittest
.
TestCase
):
class
TestProfiler
(
unittest
.
TestCase
):
...
...
python/paddle/fluid/tests/unittests/test_program.py
浏览文件 @
bde090a9
...
@@ -15,8 +15,8 @@
...
@@ -15,8 +15,8 @@
from
__future__
import
print_function
from
__future__
import
print_function
import
unittest
import
unittest
from
paddle.
v2.
fluid.framework
import
Program
,
default_main_program
,
program_guard
,
grad_var_name
from
paddle.fluid.framework
import
Program
,
default_main_program
,
program_guard
,
grad_var_name
import
paddle.
v2.
fluid.layers
as
layers
import
paddle.fluid.layers
as
layers
main_program
=
default_main_program
()
main_program
=
default_main_program
()
...
...
python/paddle/fluid/tests/unittests/test_protobuf.py
浏览文件 @
bde090a9
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
# 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.
v2.
fluid.proto.framework_pb2
as
framework_pb2
import
paddle.fluid.proto.framework_pb2
as
framework_pb2
import
unittest
import
unittest
...
...
python/paddle/fluid/tests/unittests/test_protobuf_descs.py
浏览文件 @
bde090a9
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
# limitations under the License.
# limitations under the License.
import
unittest
import
unittest
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
class
TestOpDesc
(
unittest
.
TestCase
):
class
TestOpDesc
(
unittest
.
TestCase
):
...
...
python/paddle/fluid/tests/unittests/test_recurrent_op.py
浏览文件 @
bde090a9
...
@@ -14,12 +14,12 @@
...
@@ -14,12 +14,12 @@
import
unittest
import
unittest
import
paddle.
v2.
fluid.layers
as
layers
import
paddle.fluid.layers
as
layers
from
paddle.
v2.
fluid.framework
import
Program
,
grad_var_name
from
paddle.fluid.framework
import
Program
,
grad_var_name
from
paddle.
v2.
fluid.executor
import
Executor
from
paddle.fluid.executor
import
Executor
from
paddle.
v2.
fluid.backward
import
append_backward
from
paddle.fluid.backward
import
append_backward
import
numpy
as
np
import
numpy
as
np
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
class
PyRNNBase
(
object
):
class
PyRNNBase
(
object
):
...
...
python/paddle/fluid/tests/unittests/test_recv_op.py
浏览文件 @
bde090a9
...
@@ -14,8 +14,8 @@
...
@@ -14,8 +14,8 @@
import
unittest
import
unittest
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.
v2.
fluid.layers
as
layers
import
paddle.fluid.layers
as
layers
import
numpy
import
numpy
from
multiprocessing
import
Process
from
multiprocessing
import
Process
import
os
,
sys
import
os
,
sys
...
...
python/paddle/fluid/tests/unittests/test_registry.py
浏览文件 @
bde090a9
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
# limitations under the License.
# limitations under the License.
import
unittest
import
unittest
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
numpy
as
np
import
numpy
as
np
import
decorators
import
decorators
...
...
python/paddle/fluid/tests/unittests/test_regularizer.py
浏览文件 @
bde090a9
...
@@ -14,10 +14,10 @@
...
@@ -14,10 +14,10 @@
import
unittest
import
unittest
import
paddle.
v2.
fluid.framework
as
framework
import
paddle.fluid.framework
as
framework
import
paddle.
v2.
fluid.optimizer
as
optimizer
import
paddle.fluid.optimizer
as
optimizer
import
paddle.
v2.
fluid.regularizer
as
regularizer
import
paddle.fluid.regularizer
as
regularizer
from
paddle.
v2.
fluid.backward
import
append_backward
from
paddle.fluid.backward
import
append_backward
class
TestL2DecayRegularizer
(
unittest
.
TestCase
):
class
TestL2DecayRegularizer
(
unittest
.
TestCase
):
...
...
python/paddle/fluid/tests/unittests/test_reorder_lod_tensor.py
浏览文件 @
bde090a9
...
@@ -13,8 +13,8 @@
...
@@ -13,8 +13,8 @@
# limitations under the License.
# limitations under the License.
import
unittest
import
unittest
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
import
numpy
import
numpy
...
...
python/paddle/fluid/tests/unittests/test_rnn_memory_helper_op.py
浏览文件 @
bde090a9
...
@@ -14,11 +14,11 @@
...
@@ -14,11 +14,11 @@
import
unittest
import
unittest
from
paddle.
v2.
fluid.framework
import
Program
from
paddle.fluid.framework
import
Program
from
paddle.
v2.
fluid.executor
import
Executor
from
paddle.fluid.executor
import
Executor
from
paddle.
v2.
fluid.backward
import
append_backward
from
paddle.fluid.backward
import
append_backward
import
numpy
as
np
import
numpy
as
np
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
class
RNNMemoryHelperOpTest
(
unittest
.
TestCase
):
class
RNNMemoryHelperOpTest
(
unittest
.
TestCase
):
...
...
python/paddle/fluid/tests/unittests/test_scope.py
浏览文件 @
bde090a9
...
@@ -12,25 +12,25 @@
...
@@ -12,25 +12,25 @@
# 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.
v2.
fluid.core
import
paddle.fluid.core
import
unittest
import
unittest
class
TestScope
(
unittest
.
TestCase
):
class
TestScope
(
unittest
.
TestCase
):
def
test_create_destroy
(
self
):
def
test_create_destroy
(
self
):
paddle_c
=
paddle
.
v2
.
fluid
.
core
paddle_c
=
paddle
.
fluid
.
core
scope
=
paddle_c
.
Scope
()
scope
=
paddle_c
.
Scope
()
self
.
assertIsNotNone
(
scope
)
self
.
assertIsNotNone
(
scope
)
scope_with_parent
=
scope
.
new_scope
()
scope_with_parent
=
scope
.
new_scope
()
self
.
assertIsNotNone
(
scope_with_parent
)
self
.
assertIsNotNone
(
scope_with_parent
)
def
test_none_variable
(
self
):
def
test_none_variable
(
self
):
paddle_c
=
paddle
.
v2
.
fluid
.
core
paddle_c
=
paddle
.
fluid
.
core
scope
=
paddle_c
.
Scope
()
scope
=
paddle_c
.
Scope
()
self
.
assertIsNone
(
scope
.
find_var
(
"test"
))
self
.
assertIsNone
(
scope
.
find_var
(
"test"
))
def
test_create_var_get_var
(
self
):
def
test_create_var_get_var
(
self
):
paddle_c
=
paddle
.
v2
.
fluid
.
core
paddle_c
=
paddle
.
fluid
.
core
scope
=
paddle_c
.
Scope
()
scope
=
paddle_c
.
Scope
()
var_a
=
scope
.
var
(
"var_a"
)
var_a
=
scope
.
var
(
"var_a"
)
self
.
assertIsNotNone
(
var_a
)
self
.
assertIsNotNone
(
var_a
)
...
@@ -39,7 +39,7 @@ class TestScope(unittest.TestCase):
...
@@ -39,7 +39,7 @@ class TestScope(unittest.TestCase):
self
.
assertIsNotNone
(
scope2
.
find_var
(
'var_a'
))
self
.
assertIsNotNone
(
scope2
.
find_var
(
'var_a'
))
def
test_var_get_int
(
self
):
def
test_var_get_int
(
self
):
paddle_c
=
paddle
.
v2
.
fluid
.
core
paddle_c
=
paddle
.
fluid
.
core
scope
=
paddle_c
.
Scope
()
scope
=
paddle_c
.
Scope
()
var
=
scope
.
var
(
"test_int"
)
var
=
scope
.
var
(
"test_int"
)
var
.
set_int
(
10
)
var
.
set_int
(
10
)
...
...
python/paddle/fluid/tests/unittests/test_selected_rows.py
浏览文件 @
bde090a9
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
# 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.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
...
...
python/paddle/fluid/tests/unittests/test_sgd_op.py
浏览文件 @
bde090a9
...
@@ -14,8 +14,8 @@
...
@@ -14,8 +14,8 @@
import
unittest
import
unittest
import
numpy
as
np
import
numpy
as
np
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
from
paddle.
v2.
fluid.op
import
Operator
from
paddle.fluid.op
import
Operator
from
op_test
import
OpTest
from
op_test
import
OpTest
...
...
python/paddle/fluid/tests/unittests/test_shrink_rnn_memory.py
浏览文件 @
bde090a9
...
@@ -13,12 +13,12 @@
...
@@ -13,12 +13,12 @@
# limitations under the License.
# limitations under the License.
import
unittest
import
unittest
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
from
paddle.
v2.
fluid.executor
import
Executor
from
paddle.fluid.executor
import
Executor
import
paddle.
v2.
fluid.layers
as
layers
import
paddle.fluid.layers
as
layers
from
paddle.
v2.
fluid.backward
import
append_backward
from
paddle.fluid.backward
import
append_backward
from
paddle.
v2.
fluid.framework
import
default_main_program
,
switch_main_program
from
paddle.fluid.framework
import
default_main_program
,
switch_main_program
from
paddle.
v2.
fluid.framework
import
Program
from
paddle.fluid.framework
import
Program
import
numpy
as
np
import
numpy
as
np
...
...
python/paddle/fluid/tests/unittests/test_split_and_merge_lod_tensor_op.py
浏览文件 @
bde090a9
...
@@ -13,12 +13,12 @@
...
@@ -13,12 +13,12 @@
# limitations under the License.
# limitations under the License.
import
unittest
import
unittest
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
import
numpy
as
np
import
numpy
as
np
import
paddle.
v2.
fluid.layers
as
layers
import
paddle.fluid.layers
as
layers
from
paddle.
v2.
fluid.framework
import
Program
,
program_guard
from
paddle.fluid.framework
import
Program
,
program_guard
from
paddle.
v2.
fluid.executor
import
Executor
from
paddle.fluid.executor
import
Executor
from
paddle.
v2.
fluid.backward
import
append_backward
from
paddle.fluid.backward
import
append_backward
class
TestCPULoDTensorArrayOps
(
unittest
.
TestCase
):
class
TestCPULoDTensorArrayOps
(
unittest
.
TestCase
):
...
...
python/paddle/fluid/tests/unittests/test_split_selected_rows_op.py
浏览文件 @
bde090a9
...
@@ -13,9 +13,9 @@
...
@@ -13,9 +13,9 @@
# limitations under the License.
# limitations under the License.
import
unittest
import
unittest
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
import
numpy
as
np
import
numpy
as
np
from
paddle.
v2.
fluid.op
import
Operator
from
paddle.fluid.op
import
Operator
class
TestSpliteSelectedRows
(
unittest
.
TestCase
):
class
TestSpliteSelectedRows
(
unittest
.
TestCase
):
...
...
python/paddle/fluid/tests/unittests/test_split_var.py
浏览文件 @
bde090a9
...
@@ -14,9 +14,9 @@
...
@@ -14,9 +14,9 @@
import
math
import
math
import
unittest
import
unittest
from
paddle.
v2.
fluid.distribute_transpiler
import
split_dense_variable
from
paddle.fluid.distribute_transpiler
import
split_dense_variable
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
import
random
import
random
...
...
python/paddle/fluid/tests/unittests/test_switch.py
浏览文件 @
bde090a9
...
@@ -14,11 +14,11 @@
...
@@ -14,11 +14,11 @@
import
unittest
import
unittest
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
import
paddle.
v2.
fluid.layers
as
layers
import
paddle.fluid.layers
as
layers
import
paddle.
v2.
fluid.framework
as
framework
import
paddle.fluid.framework
as
framework
from
paddle.
v2.
fluid.executor
import
Executor
from
paddle.fluid.executor
import
Executor
from
paddle.
v2.
fluid.framework
import
default_startup_program
from
paddle.fluid.framework
import
default_startup_program
class
TestSwitch
(
unittest
.
TestCase
):
class
TestSwitch
(
unittest
.
TestCase
):
...
...
python/paddle/fluid/tests/unittests/test_tensor.py
浏览文件 @
bde090a9
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
# 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.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
import
unittest
import
unittest
import
numpy
import
numpy
...
...
python/paddle/fluid/tests/unittests/test_unique_name.py
浏览文件 @
bde090a9
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
# limitations under the License.
# limitations under the License.
import
unittest
import
unittest
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
class
TestUniqueName
(
unittest
.
TestCase
):
class
TestUniqueName
(
unittest
.
TestCase
):
...
...
python/paddle/fluid/tests/unittests/test_variable.py
浏览文件 @
bde090a9
...
@@ -13,8 +13,8 @@
...
@@ -13,8 +13,8 @@
# limitations under the License.
# limitations under the License.
import
unittest
import
unittest
from
paddle.
v2.
fluid.framework
import
default_main_program
,
Program
,
convert_np_dtype_to_dtype_
from
paddle.fluid.framework
import
default_main_program
,
Program
,
convert_np_dtype_to_dtype_
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
import
numpy
as
np
import
numpy
as
np
...
...
python/paddle/fluid/tests/unittests/test_weight_normalization.py
浏览文件 @
bde090a9
...
@@ -15,10 +15,10 @@
...
@@ -15,10 +15,10 @@
import
unittest
import
unittest
import
numpy
import
numpy
import
collections
import
collections
import
paddle.
v2.
fluid
as
fluid
import
paddle.fluid
as
fluid
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
from
paddle.
v2.
fluid.initializer
import
ConstantInitializer
from
paddle.fluid.initializer
import
ConstantInitializer
from
paddle.
v2.
fluid.param_attr
import
WeightNormParamAttr
from
paddle.fluid.param_attr
import
WeightNormParamAttr
class
TestWeightNormalization
(
unittest
.
TestCase
):
class
TestWeightNormalization
(
unittest
.
TestCase
):
...
...
python/paddle/fluid/tests/unittests/test_while_op.py
浏览文件 @
bde090a9
...
@@ -13,10 +13,10 @@
...
@@ -13,10 +13,10 @@
# limitations under the License.
# limitations under the License.
import
unittest
import
unittest
import
paddle.
v2.
fluid.layers
as
layers
import
paddle.fluid.layers
as
layers
from
paddle.
v2.
fluid.executor
import
Executor
from
paddle.fluid.executor
import
Executor
import
paddle.
v2.
fluid.core
as
core
import
paddle.fluid.core
as
core
from
paddle.
v2.
fluid.backward
import
append_backward
from
paddle.fluid.backward
import
append_backward
import
numpy
import
numpy
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录