Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
046405e0
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
046405e0
编写于
5月 11, 2018
作者:
Y
Yu Yang
提交者:
GitHub
5月 11, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #10486 from reyoung/feature/clean_op_maker
Clean OpProtoAndCheckerMaker
上级
ba57348f
613d3ef0
变更
198
展开全部
隐藏空白更改
内联
并排
Showing
198 changed file
with
354 addition
and
729 deletion
+354
-729
paddle/fluid/framework/CMakeLists.txt
paddle/fluid/framework/CMakeLists.txt
+1
-1
paddle/fluid/framework/data_device_transform_test.cu
paddle/fluid/framework/data_device_transform_test.cu
+1
-2
paddle/fluid/framework/details/op_registry.h
paddle/fluid/framework/details/op_registry.h
+4
-1
paddle/fluid/framework/op_proto_maker.h
paddle/fluid/framework/op_proto_maker.h
+20
-26
paddle/fluid/framework/op_proto_maker_test.cc
paddle/fluid/framework/op_proto_maker_test.cc
+10
-8
paddle/fluid/framework/op_registry_test.cc
paddle/fluid/framework/op_registry_test.cc
+4
-9
paddle/fluid/framework/operator_test.cc
paddle/fluid/framework/operator_test.cc
+3
-7
paddle/fluid/framework/var_type_inference_test.cc
paddle/fluid/framework/var_type_inference_test.cc
+1
-2
paddle/fluid/operators/CMakeLists.txt
paddle/fluid/operators/CMakeLists.txt
+2
-0
paddle/fluid/operators/accuracy_op.cc
paddle/fluid/operators/accuracy_op.cc
+1
-2
paddle/fluid/operators/activation_op.cc
paddle/fluid/operators/activation_op.cc
+24
-37
paddle/fluid/operators/adadelta_op.cc
paddle/fluid/operators/adadelta_op.cc
+1
-2
paddle/fluid/operators/adagrad_op.cc
paddle/fluid/operators/adagrad_op.cc
+1
-2
paddle/fluid/operators/adam_op.cc
paddle/fluid/operators/adam_op.cc
+1
-2
paddle/fluid/operators/adamax_op.cc
paddle/fluid/operators/adamax_op.cc
+1
-2
paddle/fluid/operators/array_to_lod_tensor_op.cc
paddle/fluid/operators/array_to_lod_tensor_op.cc
+1
-2
paddle/fluid/operators/assign_op.cc
paddle/fluid/operators/assign_op.cc
+1
-2
paddle/fluid/operators/assign_value_op.cc
paddle/fluid/operators/assign_value_op.cc
+1
-2
paddle/fluid/operators/auc_op.cc
paddle/fluid/operators/auc_op.cc
+1
-2
paddle/fluid/operators/average_accumulates_op.cc
paddle/fluid/operators/average_accumulates_op.cc
+1
-2
paddle/fluid/operators/batch_norm_op.cc
paddle/fluid/operators/batch_norm_op.cc
+1
-2
paddle/fluid/operators/batch_size_like.h
paddle/fluid/operators/batch_size_like.h
+5
-2
paddle/fluid/operators/beam_search_decode_op.cc
paddle/fluid/operators/beam_search_decode_op.cc
+1
-2
paddle/fluid/operators/beam_search_op.cc
paddle/fluid/operators/beam_search_op.cc
+1
-2
paddle/fluid/operators/bilinear_interp_op.cc
paddle/fluid/operators/bilinear_interp_op.cc
+1
-2
paddle/fluid/operators/bilinear_tensor_product_op.cc
paddle/fluid/operators/bilinear_tensor_product_op.cc
+1
-2
paddle/fluid/operators/bipartite_match_op.cc
paddle/fluid/operators/bipartite_match_op.cc
+1
-2
paddle/fluid/operators/box_coder_op.cc
paddle/fluid/operators/box_coder_op.cc
+1
-2
paddle/fluid/operators/cast_op.cc
paddle/fluid/operators/cast_op.cc
+1
-2
paddle/fluid/operators/channel_close_op.cc
paddle/fluid/operators/channel_close_op.cc
+1
-2
paddle/fluid/operators/channel_create_op.cc
paddle/fluid/operators/channel_create_op.cc
+1
-2
paddle/fluid/operators/channel_recv_op.cc
paddle/fluid/operators/channel_recv_op.cc
+1
-2
paddle/fluid/operators/channel_send_op.cc
paddle/fluid/operators/channel_send_op.cc
+1
-2
paddle/fluid/operators/chunk_eval_op.cc
paddle/fluid/operators/chunk_eval_op.cc
+1
-2
paddle/fluid/operators/clip_by_norm_op.cc
paddle/fluid/operators/clip_by_norm_op.cc
+1
-2
paddle/fluid/operators/clip_op.cc
paddle/fluid/operators/clip_op.cc
+1
-2
paddle/fluid/operators/compare_op.cc
paddle/fluid/operators/compare_op.cc
+1
-2
paddle/fluid/operators/concat_op.cc
paddle/fluid/operators/concat_op.cc
+1
-2
paddle/fluid/operators/conditional_block_op.cc
paddle/fluid/operators/conditional_block_op.cc
+1
-2
paddle/fluid/operators/conv_op.cc
paddle/fluid/operators/conv_op.cc
+2
-4
paddle/fluid/operators/conv_op.h
paddle/fluid/operators/conv_op.h
+2
-2
paddle/fluid/operators/conv_shift_op.cc
paddle/fluid/operators/conv_shift_op.cc
+1
-2
paddle/fluid/operators/conv_transpose_op.cc
paddle/fluid/operators/conv_transpose_op.cc
+2
-6
paddle/fluid/operators/conv_transpose_op.h
paddle/fluid/operators/conv_transpose_op.h
+2
-2
paddle/fluid/operators/cos_sim_op.cc
paddle/fluid/operators/cos_sim_op.cc
+1
-2
paddle/fluid/operators/crf_decoding_op.cc
paddle/fluid/operators/crf_decoding_op.cc
+1
-2
paddle/fluid/operators/crop_op.cc
paddle/fluid/operators/crop_op.cc
+1
-2
paddle/fluid/operators/cross_entropy_op.cc
paddle/fluid/operators/cross_entropy_op.cc
+1
-2
paddle/fluid/operators/ctc_align_op.cc
paddle/fluid/operators/ctc_align_op.cc
+1
-2
paddle/fluid/operators/cumsum_op.cc
paddle/fluid/operators/cumsum_op.cc
+1
-2
paddle/fluid/operators/decayed_adagrad_op.cc
paddle/fluid/operators/decayed_adagrad_op.cc
+1
-2
paddle/fluid/operators/delete_var_op.cc
paddle/fluid/operators/delete_var_op.cc
+1
-2
paddle/fluid/operators/detection_map_op.cc
paddle/fluid/operators/detection_map_op.cc
+1
-2
paddle/fluid/operators/dropout_op.cc
paddle/fluid/operators/dropout_op.cc
+1
-2
paddle/fluid/operators/edit_distance_op.cc
paddle/fluid/operators/edit_distance_op.cc
+1
-2
paddle/fluid/operators/elementwise_add_op.cc
paddle/fluid/operators/elementwise_add_op.cc
+1
-19
paddle/fluid/operators/elementwise_div_op.cc
paddle/fluid/operators/elementwise_div_op.cc
+1
-19
paddle/fluid/operators/elementwise_max_op.cc
paddle/fluid/operators/elementwise_max_op.cc
+1
-18
paddle/fluid/operators/elementwise_min_op.cc
paddle/fluid/operators/elementwise_min_op.cc
+1
-18
paddle/fluid/operators/elementwise_mul_op.cc
paddle/fluid/operators/elementwise_mul_op.cc
+1
-20
paddle/fluid/operators/elementwise_op.h
paddle/fluid/operators/elementwise_op.h
+21
-22
paddle/fluid/operators/elementwise_pow_op.cc
paddle/fluid/operators/elementwise_pow_op.cc
+4
-6
paddle/fluid/operators/elementwise_sub_op.cc
paddle/fluid/operators/elementwise_sub_op.cc
+1
-18
paddle/fluid/operators/expand_op.cc
paddle/fluid/operators/expand_op.cc
+1
-2
paddle/fluid/operators/fc_op.cc
paddle/fluid/operators/fc_op.cc
+1
-2
paddle/fluid/operators/fc_op.h
paddle/fluid/operators/fc_op.h
+1
-1
paddle/fluid/operators/feed_op.cc
paddle/fluid/operators/feed_op.cc
+1
-2
paddle/fluid/operators/fetch_op.cc
paddle/fluid/operators/fetch_op.cc
+1
-2
paddle/fluid/operators/fill_constant_batch_size_like_op.cc
paddle/fluid/operators/fill_constant_batch_size_like_op.cc
+2
-3
paddle/fluid/operators/fill_constant_op.cc
paddle/fluid/operators/fill_constant_op.cc
+1
-2
paddle/fluid/operators/fill_op.cc
paddle/fluid/operators/fill_op.cc
+1
-2
paddle/fluid/operators/fill_zeros_like_op.cc
paddle/fluid/operators/fill_zeros_like_op.cc
+1
-2
paddle/fluid/operators/ftrl_op.cc
paddle/fluid/operators/ftrl_op.cc
+1
-2
paddle/fluid/operators/gather_op.cc
paddle/fluid/operators/gather_op.cc
+1
-2
paddle/fluid/operators/gaussian_random_batch_size_like_op.cc
paddle/fluid/operators/gaussian_random_batch_size_like_op.cc
+2
-3
paddle/fluid/operators/gaussian_random_op.cc
paddle/fluid/operators/gaussian_random_op.cc
+1
-2
paddle/fluid/operators/get_places_op.cc
paddle/fluid/operators/get_places_op.cc
+1
-2
paddle/fluid/operators/go_op.cc
paddle/fluid/operators/go_op.cc
+1
-2
paddle/fluid/operators/gru_op.cc
paddle/fluid/operators/gru_op.cc
+1
-2
paddle/fluid/operators/gru_unit_op.cc
paddle/fluid/operators/gru_unit_op.cc
+1
-2
paddle/fluid/operators/hinge_loss_op.cc
paddle/fluid/operators/hinge_loss_op.cc
+1
-2
paddle/fluid/operators/huber_loss_op.cc
paddle/fluid/operators/huber_loss_op.cc
+1
-2
paddle/fluid/operators/im2sequence_op.cc
paddle/fluid/operators/im2sequence_op.cc
+1
-2
paddle/fluid/operators/increment_op.cc
paddle/fluid/operators/increment_op.cc
+1
-2
paddle/fluid/operators/iou_similarity_op.cc
paddle/fluid/operators/iou_similarity_op.cc
+1
-2
paddle/fluid/operators/is_empty_op.cc
paddle/fluid/operators/is_empty_op.cc
+1
-2
paddle/fluid/operators/l1_norm_op.cc
paddle/fluid/operators/l1_norm_op.cc
+1
-2
paddle/fluid/operators/label_smooth_op.cc
paddle/fluid/operators/label_smooth_op.cc
+1
-2
paddle/fluid/operators/layer_norm_op.cc
paddle/fluid/operators/layer_norm_op.cc
+1
-2
paddle/fluid/operators/linear_chain_crf_op.cc
paddle/fluid/operators/linear_chain_crf_op.cc
+1
-2
paddle/fluid/operators/listen_and_serv_op.cc
paddle/fluid/operators/listen_and_serv_op.cc
+1
-2
paddle/fluid/operators/load_combine_op.cc
paddle/fluid/operators/load_combine_op.cc
+1
-2
paddle/fluid/operators/load_op.cc
paddle/fluid/operators/load_op.cc
+1
-2
paddle/fluid/operators/lod_array_length_op.cc
paddle/fluid/operators/lod_array_length_op.cc
+1
-2
paddle/fluid/operators/lod_rank_table_op.cc
paddle/fluid/operators/lod_rank_table_op.cc
+1
-2
paddle/fluid/operators/lod_reset_op.cc
paddle/fluid/operators/lod_reset_op.cc
+1
-2
paddle/fluid/operators/lod_tensor_to_array_op.cc
paddle/fluid/operators/lod_tensor_to_array_op.cc
+1
-2
paddle/fluid/operators/log_loss_op.cc
paddle/fluid/operators/log_loss_op.cc
+1
-2
paddle/fluid/operators/logical_op.cc
paddle/fluid/operators/logical_op.cc
+2
-4
paddle/fluid/operators/lookup_sparse_table_op.cc
paddle/fluid/operators/lookup_sparse_table_op.cc
+1
-2
paddle/fluid/operators/lookup_table_op.cc
paddle/fluid/operators/lookup_table_op.cc
+1
-2
paddle/fluid/operators/lrn_op.cc
paddle/fluid/operators/lrn_op.cc
+1
-2
paddle/fluid/operators/lstm_op.cc
paddle/fluid/operators/lstm_op.cc
+1
-2
paddle/fluid/operators/lstm_unit_op.cc
paddle/fluid/operators/lstm_unit_op.cc
+1
-2
paddle/fluid/operators/lstmp_op.cc
paddle/fluid/operators/lstmp_op.cc
+1
-2
paddle/fluid/operators/margin_rank_loss_op.cc
paddle/fluid/operators/margin_rank_loss_op.cc
+1
-2
paddle/fluid/operators/matmul_op.cc
paddle/fluid/operators/matmul_op.cc
+1
-2
paddle/fluid/operators/max_sequence_len_op.cc
paddle/fluid/operators/max_sequence_len_op.cc
+1
-2
paddle/fluid/operators/maxout_op.cc
paddle/fluid/operators/maxout_op.cc
+1
-2
paddle/fluid/operators/mean_op.cc
paddle/fluid/operators/mean_op.cc
+1
-2
paddle/fluid/operators/merge_lod_tensor_op.cc
paddle/fluid/operators/merge_lod_tensor_op.cc
+1
-2
paddle/fluid/operators/mine_hard_examples_op.cc
paddle/fluid/operators/mine_hard_examples_op.cc
+1
-2
paddle/fluid/operators/minus_op.cc
paddle/fluid/operators/minus_op.cc
+1
-2
paddle/fluid/operators/modified_huber_loss_op.cc
paddle/fluid/operators/modified_huber_loss_op.cc
+1
-2
paddle/fluid/operators/momentum_op.cc
paddle/fluid/operators/momentum_op.cc
+1
-2
paddle/fluid/operators/mul_op.cc
paddle/fluid/operators/mul_op.cc
+1
-2
paddle/fluid/operators/multiclass_nms_op.cc
paddle/fluid/operators/multiclass_nms_op.cc
+1
-2
paddle/fluid/operators/multiplex_op.cc
paddle/fluid/operators/multiplex_op.cc
+1
-2
paddle/fluid/operators/nccl_op.cc
paddle/fluid/operators/nccl_op.cc
+4
-8
paddle/fluid/operators/nce_op.cc
paddle/fluid/operators/nce_op.cc
+1
-2
paddle/fluid/operators/norm_op.cc
paddle/fluid/operators/norm_op.cc
+1
-2
paddle/fluid/operators/one_hot_op.cc
paddle/fluid/operators/one_hot_op.cc
+1
-2
paddle/fluid/operators/pad_op.cc
paddle/fluid/operators/pad_op.cc
+1
-2
paddle/fluid/operators/parallel_do_op.cc
paddle/fluid/operators/parallel_do_op.cc
+1
-2
paddle/fluid/operators/pool_op.cc
paddle/fluid/operators/pool_op.cc
+2
-4
paddle/fluid/operators/pool_op.h
paddle/fluid/operators/pool_op.h
+2
-2
paddle/fluid/operators/pool_with_index_op.cc
paddle/fluid/operators/pool_with_index_op.cc
+2
-4
paddle/fluid/operators/positive_negative_pair_op.cc
paddle/fluid/operators/positive_negative_pair_op.cc
+1
-2
paddle/fluid/operators/precision_recall_op.cc
paddle/fluid/operators/precision_recall_op.cc
+1
-2
paddle/fluid/operators/prefetch_op.cc
paddle/fluid/operators/prefetch_op.cc
+1
-2
paddle/fluid/operators/prelu_op.cc
paddle/fluid/operators/prelu_op.cc
+1
-2
paddle/fluid/operators/print_op.cc
paddle/fluid/operators/print_op.cc
+1
-2
paddle/fluid/operators/prior_box_op.cc
paddle/fluid/operators/prior_box_op.cc
+1
-2
paddle/fluid/operators/proximal_adagrad_op.cc
paddle/fluid/operators/proximal_adagrad_op.cc
+1
-2
paddle/fluid/operators/proximal_gd_op.cc
paddle/fluid/operators/proximal_gd_op.cc
+1
-2
paddle/fluid/operators/rank_loss_op.cc
paddle/fluid/operators/rank_loss_op.cc
+1
-2
paddle/fluid/operators/read_op.cc
paddle/fluid/operators/read_op.cc
+1
-2
paddle/fluid/operators/reader/create_batch_reader_op.cc
paddle/fluid/operators/reader/create_batch_reader_op.cc
+2
-3
paddle/fluid/operators/reader/create_double_buffer_reader_op.cc
.../fluid/operators/reader/create_double_buffer_reader_op.cc
+3
-4
paddle/fluid/operators/reader/create_multi_pass_reader_op.cc
paddle/fluid/operators/reader/create_multi_pass_reader_op.cc
+8
-9
paddle/fluid/operators/reader/create_random_data_generator_op.cc
...fluid/operators/reader/create_random_data_generator_op.cc
+2
-3
paddle/fluid/operators/reader/create_recordio_file_reader_op.cc
.../fluid/operators/reader/create_recordio_file_reader_op.cc
+2
-3
paddle/fluid/operators/reader/create_shuffle_reader_op.cc
paddle/fluid/operators/reader/create_shuffle_reader_op.cc
+2
-3
paddle/fluid/operators/reader/create_threaded_reader_op.cc
paddle/fluid/operators/reader/create_threaded_reader_op.cc
+7
-8
paddle/fluid/operators/reader/open_files_op.cc
paddle/fluid/operators/reader/open_files_op.cc
+3
-4
paddle/fluid/operators/reader/reader_op_registry.cc
paddle/fluid/operators/reader/reader_op_registry.cc
+4
-8
paddle/fluid/operators/reader/reader_op_registry.h
paddle/fluid/operators/reader/reader_op_registry.h
+8
-2
paddle/fluid/operators/recurrent_op.cc
paddle/fluid/operators/recurrent_op.cc
+1
-2
paddle/fluid/operators/recv_op.cc
paddle/fluid/operators/recv_op.cc
+1
-2
paddle/fluid/operators/reduce_op.cc
paddle/fluid/operators/reduce_op.cc
+23
-86
paddle/fluid/operators/reorder_lod_tensor_by_rank_op.cc
paddle/fluid/operators/reorder_lod_tensor_by_rank_op.cc
+1
-3
paddle/fluid/operators/reshape_op.cc
paddle/fluid/operators/reshape_op.cc
+1
-2
paddle/fluid/operators/rmsprop_op.cc
paddle/fluid/operators/rmsprop_op.cc
+1
-2
paddle/fluid/operators/rnn_memory_helper_op.cc
paddle/fluid/operators/rnn_memory_helper_op.cc
+2
-4
paddle/fluid/operators/roi_pool_op.cc
paddle/fluid/operators/roi_pool_op.cc
+1
-2
paddle/fluid/operators/row_conv_op.cc
paddle/fluid/operators/row_conv_op.cc
+1
-2
paddle/fluid/operators/save_combine_op.cc
paddle/fluid/operators/save_combine_op.cc
+1
-2
paddle/fluid/operators/save_op.cc
paddle/fluid/operators/save_op.cc
+1
-2
paddle/fluid/operators/scale_op.cc
paddle/fluid/operators/scale_op.cc
+1
-2
paddle/fluid/operators/scatter_op.cc
paddle/fluid/operators/scatter_op.cc
+1
-2
paddle/fluid/operators/select_op.cc
paddle/fluid/operators/select_op.cc
+1
-2
paddle/fluid/operators/send_barrier_op.cc
paddle/fluid/operators/send_barrier_op.cc
+1
-2
paddle/fluid/operators/send_op.cc
paddle/fluid/operators/send_op.cc
+1
-2
paddle/fluid/operators/send_vars_op.cc
paddle/fluid/operators/send_vars_op.cc
+1
-2
paddle/fluid/operators/sequence_concat_op.cc
paddle/fluid/operators/sequence_concat_op.cc
+1
-2
paddle/fluid/operators/sequence_conv_op.cc
paddle/fluid/operators/sequence_conv_op.cc
+1
-2
paddle/fluid/operators/sequence_erase_op.cc
paddle/fluid/operators/sequence_erase_op.cc
+1
-2
paddle/fluid/operators/sequence_expand_op.cc
paddle/fluid/operators/sequence_expand_op.cc
+1
-2
paddle/fluid/operators/sequence_pool_op.cc
paddle/fluid/operators/sequence_pool_op.cc
+1
-2
paddle/fluid/operators/sequence_reshape_op.cc
paddle/fluid/operators/sequence_reshape_op.cc
+1
-2
paddle/fluid/operators/sequence_slice_op.cc
paddle/fluid/operators/sequence_slice_op.cc
+1
-2
paddle/fluid/operators/sequence_softmax_op.cc
paddle/fluid/operators/sequence_softmax_op.cc
+1
-2
paddle/fluid/operators/sgd_op.cc
paddle/fluid/operators/sgd_op.cc
+1
-2
paddle/fluid/operators/shrink_rnn_memory_op.cc
paddle/fluid/operators/shrink_rnn_memory_op.cc
+1
-2
paddle/fluid/operators/sigmoid_cross_entropy_with_logits_op.cc
...e/fluid/operators/sigmoid_cross_entropy_with_logits_op.cc
+1
-3
paddle/fluid/operators/sign_op.cc
paddle/fluid/operators/sign_op.cc
+1
-2
paddle/fluid/operators/smooth_l1_loss_op.cc
paddle/fluid/operators/smooth_l1_loss_op.cc
+1
-2
paddle/fluid/operators/softmax_op.cc
paddle/fluid/operators/softmax_op.cc
+1
-2
paddle/fluid/operators/softmax_with_cross_entropy_op.cc
paddle/fluid/operators/softmax_with_cross_entropy_op.cc
+1
-2
paddle/fluid/operators/split_byref_op.cc
paddle/fluid/operators/split_byref_op.cc
+1
-2
paddle/fluid/operators/split_ids_op.cc
paddle/fluid/operators/split_ids_op.cc
+1
-2
paddle/fluid/operators/split_lod_tensor_op.cc
paddle/fluid/operators/split_lod_tensor_op.cc
+1
-2
paddle/fluid/operators/split_op.cc
paddle/fluid/operators/split_op.cc
+1
-2
paddle/fluid/operators/split_selected_rows_op.cc
paddle/fluid/operators/split_selected_rows_op.cc
+1
-2
paddle/fluid/operators/spp_op.cc
paddle/fluid/operators/spp_op.cc
+1
-2
paddle/fluid/operators/squared_l2_distance_op.cc
paddle/fluid/operators/squared_l2_distance_op.cc
+1
-2
paddle/fluid/operators/squared_l2_norm_op.cc
paddle/fluid/operators/squared_l2_norm_op.cc
+1
-2
paddle/fluid/operators/sum_op.cc
paddle/fluid/operators/sum_op.cc
+1
-2
paddle/fluid/operators/target_assign_op.cc
paddle/fluid/operators/target_assign_op.cc
+1
-2
paddle/fluid/operators/tensor_array_read_write_op.cc
paddle/fluid/operators/tensor_array_read_write_op.cc
+2
-4
paddle/fluid/operators/top_k_op.cc
paddle/fluid/operators/top_k_op.cc
+1
-2
paddle/fluid/operators/transpose_op.cc
paddle/fluid/operators/transpose_op.cc
+1
-2
paddle/fluid/operators/uniform_random_batch_size_like_op.cc
paddle/fluid/operators/uniform_random_batch_size_like_op.cc
+2
-3
paddle/fluid/operators/uniform_random_op.cc
paddle/fluid/operators/uniform_random_op.cc
+1
-2
paddle/fluid/operators/unpool_op.cc
paddle/fluid/operators/unpool_op.cc
+1
-2
paddle/fluid/operators/warpctc_op.cc
paddle/fluid/operators/warpctc_op.cc
+1
-2
paddle/fluid/operators/while_op.cc
paddle/fluid/operators/while_op.cc
+1
-2
python/paddle/fluid/layers/layer_function_generator.py
python/paddle/fluid/layers/layer_function_generator.py
+1
-1
未找到文件。
paddle/fluid/framework/CMakeLists.txt
浏览文件 @
046405e0
...
@@ -57,7 +57,7 @@ cc_library(data_transform SRCS data_transform.cc DEPS math_function tensor
...
@@ -57,7 +57,7 @@ cc_library(data_transform SRCS data_transform.cc DEPS math_function tensor
cc_library
(
attribute SRCS attribute.cc DEPS framework_proto boost
)
cc_library
(
attribute SRCS attribute.cc DEPS framework_proto boost
)
cc_test
(
program_desc_test SRCS program_desc_test.cc DEPS proto_desc
cc_test
(
program_desc_test SRCS program_desc_test.cc DEPS proto_desc
device_context
)
device_context
)
cc_library
(
op_proto_maker SRCS op_proto_maker.cc DEPS framework_proto attribute
)
cc_library
(
op_proto_maker SRCS op_proto_maker.cc DEPS framework_proto attribute
glog
)
cc_test
(
op_proto_maker_test SRCS op_proto_maker_test.cc DEPS op_proto_maker
)
cc_test
(
op_proto_maker_test SRCS op_proto_maker_test.cc DEPS op_proto_maker
)
cc_library
(
op_info SRCS op_info.cc DEPS attribute framework_proto
)
cc_library
(
op_info SRCS op_info.cc DEPS attribute framework_proto
)
cc_library
(
shape_inference SRCS shape_inference.cc DEPS ddim attribute device_context
)
cc_library
(
shape_inference SRCS shape_inference.cc DEPS ddim attribute device_context
)
...
...
paddle/fluid/framework/data_device_transform_test.cu
浏览文件 @
046405e0
...
@@ -32,8 +32,7 @@ struct AddFunctor {
...
@@ -32,8 +32,7 @@ struct AddFunctor {
class
OpKernelTestProtoAndCheckerMaker
:
public
OpProtoAndCheckerMaker
{
class
OpKernelTestProtoAndCheckerMaker
:
public
OpProtoAndCheckerMaker
{
public:
public:
OpKernelTestProtoAndCheckerMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"input"
,
"input1 of test op"
);
AddInput
(
"input"
,
"input1 of test op"
);
AddOutput
(
"output"
,
"output of test op"
);
AddOutput
(
"output"
,
"output of test op"
);
AddAttr
<
bool
>
(
"use_gpu"
,
"force to use gpu kernel"
).
SetDefault
(
false
);
AddAttr
<
bool
>
(
"use_gpu"
,
"force to use gpu kernel"
).
SetDefault
(
false
);
...
...
paddle/fluid/framework/details/op_registry.h
浏览文件 @
046405e0
...
@@ -95,7 +95,10 @@ struct OpInfoFiller<T, kOpProtoAndCheckerMaker> {
...
@@ -95,7 +95,10 @@ struct OpInfoFiller<T, kOpProtoAndCheckerMaker> {
void
operator
()(
const
char
*
op_type
,
OpInfo
*
info
)
const
{
void
operator
()(
const
char
*
op_type
,
OpInfo
*
info
)
const
{
info
->
proto_
=
new
proto
::
OpProto
;
info
->
proto_
=
new
proto
::
OpProto
;
info
->
checker_
=
new
OpAttrChecker
();
info
->
checker_
=
new
OpAttrChecker
();
auto
maker
=
T
(
info
->
proto_
,
info
->
checker_
);
T
maker
;
maker
.
SetProto
(
info
->
proto_
);
maker
.
SetChecker
(
info
->
checker_
);
maker
.
Make
();
maker
.
Validate
();
maker
.
Validate
();
info
->
proto_
->
set_type
(
op_type
);
info
->
proto_
->
set_type
(
op_type
);
PADDLE_ENFORCE
(
PADDLE_ENFORCE
(
...
...
paddle/fluid/framework/op_proto_maker.h
浏览文件 @
046405e0
...
@@ -14,56 +14,57 @@ limitations under the License. */
...
@@ -14,56 +14,57 @@ limitations under the License. */
#pragma once
#pragma once
#include <string>
#include <string>
#include "glog/logging.h"
#include "paddle/fluid/framework/attribute.h"
#include "paddle/fluid/framework/attribute.h"
#include "paddle/fluid/framework/framework.pb.h"
#include "paddle/fluid/framework/framework.pb.h"
namespace
paddle
{
namespace
paddle
{
namespace
framework
{
namespace
framework
{
// this class not only make proto but also init attribute checkers.
// this class not only make proto but also init attribute checkers.
class
OpProtoAndCheckerMaker
{
class
OpProtoAndCheckerMaker
{
public:
public:
using
OpProto
=
proto
::
OpProto
;
virtual
void
Make
()
=
0
;
using
OpAttrChecker
=
framework
::
OpAttrChecker
;
OpProtoAndCheckerMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
:
proto_
(
proto
),
op_checker_
(
op_checker
)
{}
virtual
~
OpProtoAndCheckerMaker
()
{
virtual
~
OpProtoAndCheckerMaker
()
{
PADDLE_ENFORCE
(
validated_
,
"should call Validate after build"
)
;
CHECK
(
validated_
)
<<
"should call Validate after build"
;
}
}
void
SetProto
(
proto
::
OpProto
*
proto
)
{
proto_
=
proto
;
}
void
SetChecker
(
OpAttrChecker
*
attr_checker
)
{
op_checker_
=
attr_checker
;
}
void
Validate
();
void
Validate
();
protected:
protected:
struct
VariableBuilder
{
struct
VariableBuilder
{
OpProto
::
Var
*
var_
;
proto
::
OpProto
::
Var
*
var_
;
VariableBuilder
&
AsDuplicable
()
{
VariableBuilder
&
AsDuplicable
()
{
var_
->
set_duplicable
(
true
);
var_
->
set_duplicable
(
true
);
return
*
this
;
return
*
this
;
}
}
VariableBuilder
&
AsIntermediate
()
{
VariableBuilder
&
AsIntermediate
()
{
var_
->
set_intermediate
(
true
);
var_
->
set_intermediate
(
true
);
return
*
this
;
return
*
this
;
}
}
VariableBuilder
&
AsDispensable
()
{
VariableBuilder
&
AsDispensable
()
{
var_
->
set_dispensable
(
true
);
var_
->
set_dispensable
(
true
);
return
*
this
;
return
*
this
;
}
}
};
};
VariableBuilder
AddInput
(
const
std
::
string
&
name
,
const
std
::
string
&
comment
);
VariableBuilder
AddInput
(
const
std
::
string
&
name
,
const
std
::
string
&
comment
);
VariableBuilder
AddOutput
(
const
std
::
string
&
name
,
VariableBuilder
AddOutput
(
const
std
::
string
&
name
,
const
std
::
string
&
comment
);
const
std
::
string
&
comment
);
template
<
typename
T
>
template
<
typename
T
>
TypedAttrChecker
<
T
>
&
AddAttr
(
const
std
::
string
&
name
,
TypedAttrChecker
<
T
>
&
AddAttr
(
const
std
::
string
&
name
,
const
std
::
string
&
comment
,
const
std
::
string
&
comment
,
bool
generated
=
false
)
{
bool
generated
=
false
)
{
auto
*
attr
=
proto_
->
add_attrs
();
auto
*
attr
=
proto_
->
add_attrs
();
attr
->
set_name
(
name
);
attr
->
set_name
(
name
);
attr
->
set_comment
(
comment
);
attr
->
set_comment
(
comment
);
attr
->
set_generated
(
generated
);
attr
->
set_generated
(
generated
);
...
@@ -71,21 +72,14 @@ class OpProtoAndCheckerMaker {
...
@@ -71,21 +72,14 @@ class OpProtoAndCheckerMaker {
return
op_checker_
->
AddAttrChecker
<
T
>
(
name
);
return
op_checker_
->
AddAttrChecker
<
T
>
(
name
);
}
}
void
AddComment
(
const
std
::
string
&
comment
)
{
proto_
->
set_comment
(
comment
);
}
void
AddComment
(
const
std
::
string
&
comment
)
{
proto_
->
set_comment
(
comment
);
}
private:
private:
void
CheckNoDuplicatedInOutAttrs
();
void
CheckNoDuplicatedInOutAttrs
();
OpProto
*
proto_
;
proto
::
OpProto
*
proto_
;
OpAttrChecker
*
op_checker_
;
OpAttrChecker
*
op_checker_
;
bool
validated_
{
false
};
bool
validated_
{
false
};
};
};
class
NOPMaker
:
public
OpProtoAndCheckerMaker
{
public:
NOPMaker
(
OpProto
*
proto
,
framework
::
OpAttrChecker
*
op_checker
)
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{}
};
}
// namespace framework
}
// namespace framework
}
// namespace paddle
}
// namespace paddle
paddle/fluid/framework/op_proto_maker_test.cc
浏览文件 @
046405e0
...
@@ -18,9 +18,7 @@ limitations under the License. */
...
@@ -18,9 +18,7 @@ limitations under the License. */
class
TestAttrProtoMaker
:
public
paddle
::
framework
::
OpProtoAndCheckerMaker
{
class
TestAttrProtoMaker
:
public
paddle
::
framework
::
OpProtoAndCheckerMaker
{
public:
public:
TestAttrProtoMaker
(
paddle
::
framework
::
proto
::
OpProto
*
proto
,
void
Make
()
{
paddle
::
framework
::
OpAttrChecker
*
op_checker
)
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddAttr
<
float
>
(
"scale"
,
"scale of test op"
);
AddAttr
<
float
>
(
"scale"
,
"scale of test op"
);
AddAttr
<
float
>
(
"scale"
,
"scale of test op"
);
AddAttr
<
float
>
(
"scale"
,
"scale of test op"
);
}
}
...
@@ -29,15 +27,16 @@ class TestAttrProtoMaker : public paddle::framework::OpProtoAndCheckerMaker {
...
@@ -29,15 +27,16 @@ class TestAttrProtoMaker : public paddle::framework::OpProtoAndCheckerMaker {
TEST
(
ProtoMaker
,
DuplicatedAttr
)
{
TEST
(
ProtoMaker
,
DuplicatedAttr
)
{
paddle
::
framework
::
proto
::
OpProto
op_proto
;
paddle
::
framework
::
proto
::
OpProto
op_proto
;
paddle
::
framework
::
OpAttrChecker
op_checker
;
paddle
::
framework
::
OpAttrChecker
op_checker
;
auto
proto_maker
=
TestAttrProtoMaker
(
&
op_proto
,
&
op_checker
);
TestAttrProtoMaker
proto_maker
;
proto_maker
.
SetProto
(
&
op_proto
);
proto_maker
.
SetChecker
(
&
op_checker
);
proto_maker
.
Make
();
ASSERT_THROW
(
proto_maker
.
Validate
(),
paddle
::
platform
::
EnforceNotMet
);
ASSERT_THROW
(
proto_maker
.
Validate
(),
paddle
::
platform
::
EnforceNotMet
);
}
}
class
TestInOutProtoMaker
:
public
paddle
::
framework
::
OpProtoAndCheckerMaker
{
class
TestInOutProtoMaker
:
public
paddle
::
framework
::
OpProtoAndCheckerMaker
{
public:
public:
TestInOutProtoMaker
(
paddle
::
framework
::
proto
::
OpProto
*
proto
,
void
Make
()
{
paddle
::
framework
::
OpAttrChecker
*
op_checker
)
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"input"
,
"input of test op"
);
AddInput
(
"input"
,
"input of test op"
);
AddInput
(
"input"
,
"input of test op"
);
AddInput
(
"input"
,
"input of test op"
);
}
}
...
@@ -46,6 +45,9 @@ class TestInOutProtoMaker : public paddle::framework::OpProtoAndCheckerMaker {
...
@@ -46,6 +45,9 @@ class TestInOutProtoMaker : public paddle::framework::OpProtoAndCheckerMaker {
TEST
(
ProtoMaker
,
DuplicatedInOut
)
{
TEST
(
ProtoMaker
,
DuplicatedInOut
)
{
paddle
::
framework
::
proto
::
OpProto
op_proto
;
paddle
::
framework
::
proto
::
OpProto
op_proto
;
paddle
::
framework
::
OpAttrChecker
op_checker
;
paddle
::
framework
::
OpAttrChecker
op_checker
;
auto
proto_maker
=
TestInOutProtoMaker
(
&
op_proto
,
&
op_checker
);
TestAttrProtoMaker
proto_maker
;
proto_maker
.
SetProto
(
&
op_proto
);
proto_maker
.
SetChecker
(
&
op_checker
);
proto_maker
.
Make
();
ASSERT_THROW
(
proto_maker
.
Validate
(),
paddle
::
platform
::
EnforceNotMet
);
ASSERT_THROW
(
proto_maker
.
Validate
(),
paddle
::
platform
::
EnforceNotMet
);
}
}
paddle/fluid/framework/op_registry_test.cc
浏览文件 @
046405e0
...
@@ -33,8 +33,7 @@ class CosineOp : public OperatorBase {
...
@@ -33,8 +33,7 @@ class CosineOp : public OperatorBase {
class
CosineOpProtoAndCheckerMaker
:
public
OpProtoAndCheckerMaker
{
class
CosineOpProtoAndCheckerMaker
:
public
OpProtoAndCheckerMaker
{
public:
public:
CosineOpProtoAndCheckerMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"input"
,
"input of cosine op"
);
AddInput
(
"input"
,
"input of cosine op"
);
AddOutput
(
"output"
,
"output of cosine op"
);
AddOutput
(
"output"
,
"output of cosine op"
);
AddAttr
<
float
>
(
"scale"
,
"scale of cosine op"
)
AddAttr
<
float
>
(
"scale"
,
"scale of cosine op"
)
...
@@ -55,8 +54,7 @@ class MyTestOp : public OperatorBase {
...
@@ -55,8 +54,7 @@ class MyTestOp : public OperatorBase {
class
MyTestOpProtoAndCheckerMaker
:
public
OpProtoAndCheckerMaker
{
class
MyTestOpProtoAndCheckerMaker
:
public
OpProtoAndCheckerMaker
{
public:
public:
MyTestOpProtoAndCheckerMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"input"
,
"input of cosine op"
).
AsDuplicable
();
AddInput
(
"input"
,
"input of cosine op"
).
AsDuplicable
();
AddOutput
(
"output"
,
"output of cosine op"
).
AsIntermediate
();
AddOutput
(
"output"
,
"output of cosine op"
).
AsIntermediate
();
auto
my_checker
=
[](
int
i
)
{
auto
my_checker
=
[](
int
i
)
{
...
@@ -212,10 +210,7 @@ namespace framework {
...
@@ -212,10 +210,7 @@ namespace framework {
class
OpKernelTestMaker
:
public
OpProtoAndCheckerMaker
{
class
OpKernelTestMaker
:
public
OpProtoAndCheckerMaker
{
public:
public:
OpKernelTestMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
{
AddComment
(
"NoGradOp, same input output. no Grad"
);
}
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddComment
(
"NoGradOp, same input output. no Grad"
);
}
};
};
class
OpWithKernelTest
:
public
OperatorWithKernel
{
class
OpWithKernelTest
:
public
OperatorWithKernel
{
...
@@ -275,9 +270,9 @@ TEST(OperatorRegistrar, CUDA) {
...
@@ -275,9 +270,9 @@ TEST(OperatorRegistrar, CUDA) {
static
int
op_test_value
=
0
;
static
int
op_test_value
=
0
;
using
paddle
::
platform
::
DeviceContext
;
using
paddle
::
platform
::
CPUDeviceContext
;
using
paddle
::
platform
::
CPUDeviceContext
;
using
paddle
::
platform
::
CUDADeviceContext
;
using
paddle
::
platform
::
CUDADeviceContext
;
using
paddle
::
platform
::
DeviceContext
;
namespace
paddle
{
namespace
paddle
{
namespace
framework
{
namespace
framework
{
...
...
paddle/fluid/framework/operator_test.cc
浏览文件 @
046405e0
...
@@ -46,8 +46,7 @@ class OpWithoutKernelTest : public OperatorBase {
...
@@ -46,8 +46,7 @@ class OpWithoutKernelTest : public OperatorBase {
class
OpWithoutKernelCheckerMaker
:
public
OpProtoAndCheckerMaker
{
class
OpWithoutKernelCheckerMaker
:
public
OpProtoAndCheckerMaker
{
public:
public:
OpWithoutKernelCheckerMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"input"
,
"input of test op"
);
AddInput
(
"input"
,
"input of test op"
);
AddOutput
(
"output"
,
"output of test op"
);
AddOutput
(
"output"
,
"output of test op"
);
AddAttr
<
float
>
(
"scale"
,
"scale of cosine op"
);
AddAttr
<
float
>
(
"scale"
,
"scale of cosine op"
);
...
@@ -98,8 +97,7 @@ namespace framework {
...
@@ -98,8 +97,7 @@ namespace framework {
class
OpKernelTestProtoAndCheckerMaker
:
public
OpProtoAndCheckerMaker
{
class
OpKernelTestProtoAndCheckerMaker
:
public
OpProtoAndCheckerMaker
{
public:
public:
OpKernelTestProtoAndCheckerMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"x"
,
"input of test op"
);
AddInput
(
"x"
,
"input of test op"
);
AddOutput
(
"y"
,
"output of test op"
);
AddOutput
(
"y"
,
"output of test op"
);
AddAttr
<
float
>
(
"scale"
,
"scale of cosine op"
)
AddAttr
<
float
>
(
"scale"
,
"scale of cosine op"
)
...
@@ -137,9 +135,7 @@ class CPUKernelTest : public OpKernel<float> {
...
@@ -137,9 +135,7 @@ class CPUKernelTest : public OpKernel<float> {
class
OpKernelTestMultiInputsProtoAndCheckerMaker
class
OpKernelTestMultiInputsProtoAndCheckerMaker
:
public
OpProtoAndCheckerMaker
{
:
public
OpProtoAndCheckerMaker
{
public:
public:
OpKernelTestMultiInputsProtoAndCheckerMaker
(
OpProto
*
proto
,
void
Make
()
{
OpAttrChecker
*
op_checker
)
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"xs"
,
"inputs of test op"
).
AsDuplicable
();
AddInput
(
"xs"
,
"inputs of test op"
).
AsDuplicable
();
AddInput
(
"k"
,
"input of test op"
);
AddInput
(
"k"
,
"input of test op"
);
AddOutput
(
"ys"
,
"outputs of test op"
).
AsDuplicable
();
AddOutput
(
"ys"
,
"outputs of test op"
).
AsDuplicable
();
...
...
paddle/fluid/framework/var_type_inference_test.cc
浏览文件 @
046405e0
...
@@ -24,8 +24,7 @@ namespace framework {
...
@@ -24,8 +24,7 @@ namespace framework {
class
SumOpMaker
:
public
OpProtoAndCheckerMaker
{
class
SumOpMaker
:
public
OpProtoAndCheckerMaker
{
public:
public:
SumOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
""
).
AsDuplicable
();
AddInput
(
"X"
,
""
).
AsDuplicable
();
AddOutput
(
"Out"
,
""
);
AddOutput
(
"Out"
,
""
);
AddComment
(
""
);
AddComment
(
""
);
...
...
paddle/fluid/operators/CMakeLists.txt
浏览文件 @
046405e0
...
@@ -166,6 +166,8 @@ function(op_library TARGET)
...
@@ -166,6 +166,8 @@ function(op_library TARGET)
# NOTE(*): activation use macro to regist the kernels, set use_op manually.
# NOTE(*): activation use macro to regist the kernels, set use_op manually.
if
(
${
TARGET
}
STREQUAL
"activation"
)
if
(
${
TARGET
}
STREQUAL
"activation"
)
file
(
APPEND
${
pybind_file
}
"USE_OP(relu);
\n
"
)
file
(
APPEND
${
pybind_file
}
"USE_OP(relu);
\n
"
)
elseif
(
${
TARGET
}
STREQUAL
"reduce"
)
file
(
APPEND
${
pybind_file
}
"USE_OP(reduce_sum);
\n
"
)
else
()
else
()
file
(
APPEND
${
pybind_file
}
"USE_OP(
${
TARGET
}
);
\n
"
)
file
(
APPEND
${
pybind_file
}
"USE_OP(
${
TARGET
}
);
\n
"
)
endif
()
endif
()
...
...
paddle/fluid/operators/accuracy_op.cc
浏览文件 @
046405e0
...
@@ -63,8 +63,7 @@ class AccuracyOp : public framework::OperatorWithKernel {
...
@@ -63,8 +63,7 @@ class AccuracyOp : public framework::OperatorWithKernel {
class
AccuracyOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
AccuracyOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
AccuracyOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
// TODO(typhoonzero): support both inference value and indices.
// TODO(typhoonzero): support both inference value and indices.
AddInput
(
"Out"
,
"The network output of topk (inferences)"
);
AddInput
(
"Out"
,
"The network output of topk (inferences)"
);
AddInput
(
"Indices"
,
"The the network output of topk (indices)"
);
AddInput
(
"Indices"
,
"The the network output of topk (indices)"
);
...
...
paddle/fluid/operators/activation_op.cc
浏览文件 @
046405e0
...
@@ -19,19 +19,18 @@ limitations under the License. */
...
@@ -19,19 +19,18 @@ limitations under the License. */
namespace
paddle
{
namespace
paddle
{
namespace
operators
{
namespace
operators
{
#define REGISTER_ACTIVATION_OP_MAKER(OP_NAME, OP_COMMENT) \
#define REGISTER_ACTIVATION_OP_MAKER(OP_NAME, OP_COMMENT) \
class OP_NAME##OpMaker \
class OP_NAME##OpMaker \
: public ::paddle::framework::OpProtoAndCheckerMaker { \
: public ::paddle::framework::OpProtoAndCheckerMaker { \
public: \
public: \
OP_NAME##OpMaker(OpProto *proto, OpAttrChecker *op_checker) \
void Make() override { \
: ::paddle::framework::OpProtoAndCheckerMaker(proto, op_checker) { \
AddInput("X", "Input of " #OP_NAME "operator"); \
AddInput("X", "Input of " #OP_NAME "operator"); \
AddOutput("Out", "Output of" #OP_NAME "operator"); \
AddOutput("Out", "Output of" #OP_NAME "operator"); \
AddAttr<bool>("use_mkldnn", \
AddAttr<bool>("use_mkldnn", \
"(bool, default false) Only used in mkldnn kernel") \
"(bool, default false) Only used in mkldnn kernel") \
.SetDefault(false); \
.SetDefault(false); \
AddComment(#OP_COMMENT); \
AddComment(#OP_COMMENT); \
} \
} \
}
}
#define REGISTER_ACTIVATION_OP_GRAD_MAKER(OP_NAME, KERNEL_TYPE) \
#define REGISTER_ACTIVATION_OP_GRAD_MAKER(OP_NAME, KERNEL_TYPE) \
...
@@ -204,8 +203,7 @@ $$out = \frac{x}{1 + |x|}$$
...
@@ -204,8 +203,7 @@ $$out = \frac{x}{1 + |x|}$$
class
LeakyReluOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
LeakyReluOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
LeakyReluOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
framework
::
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
"Input of LeakyRelu operator"
);
AddInput
(
"X"
,
"Input of LeakyRelu operator"
);
AddOutput
(
"Out"
,
"Output of LeakyRelu operator"
);
AddOutput
(
"Out"
,
"Output of LeakyRelu operator"
);
AddAttr
<
float
>
(
"alpha"
,
"The small negative slope"
).
SetDefault
(
0.02
f
);
AddAttr
<
float
>
(
"alpha"
,
"The small negative slope"
).
SetDefault
(
0.02
f
);
...
@@ -220,8 +218,7 @@ $out = \max(x, \alpha * x)$
...
@@ -220,8 +218,7 @@ $out = \max(x, \alpha * x)$
class
SoftShrinkOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
SoftShrinkOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
SoftShrinkOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
framework
::
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
"Input of Softshrink operator"
);
AddInput
(
"X"
,
"Input of Softshrink operator"
);
AddOutput
(
"Out"
,
"Output of Softshrink operator"
);
AddOutput
(
"Out"
,
"Output of Softshrink operator"
);
AddAttr
<
float
>
(
"lambda"
,
"non-negative offset"
).
SetDefault
(
0.5
f
);
AddAttr
<
float
>
(
"lambda"
,
"non-negative offset"
).
SetDefault
(
0.5
f
);
...
@@ -242,8 +239,7 @@ $$
...
@@ -242,8 +239,7 @@ $$
class
HardShrinkOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
HardShrinkOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
HardShrinkOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
framework
::
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
"Input of HardShrink operator"
);
AddInput
(
"X"
,
"Input of HardShrink operator"
);
AddOutput
(
"Out"
,
"Output of HardShrink operator"
);
AddOutput
(
"Out"
,
"Output of HardShrink operator"
);
AddAttr
<
float
>
(
"threshold"
,
"The value of threshold for HardShrink"
)
AddAttr
<
float
>
(
"threshold"
,
"The value of threshold for HardShrink"
)
...
@@ -265,8 +261,7 @@ $$
...
@@ -265,8 +261,7 @@ $$
class
BReluOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
BReluOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
BReluOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
framework
::
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
"Input of BRelu operator"
);
AddInput
(
"X"
,
"Input of BRelu operator"
);
AddOutput
(
"Out"
,
"Output of BRelu operator"
);
AddOutput
(
"Out"
,
"Output of BRelu operator"
);
AddAttr
<
float
>
(
"t_min"
,
"The min marginal value of BRelu"
)
AddAttr
<
float
>
(
"t_min"
,
"The min marginal value of BRelu"
)
...
@@ -284,8 +279,7 @@ $out = \max(\min(x, t_{min}), t_{max})$
...
@@ -284,8 +279,7 @@ $out = \max(\min(x, t_{min}), t_{max})$
class
SoftReluOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
SoftReluOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
SoftReluOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
framework
::
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
"Input of SoftRelu operator"
);
AddInput
(
"X"
,
"Input of SoftRelu operator"
);
AddOutput
(
"Out"
,
"Output of SoftRelu operator"
);
AddOutput
(
"Out"
,
"Output of SoftRelu operator"
);
AddAttr
<
float
>
(
"threshold"
,
"The threshold value of SoftRelu"
)
AddAttr
<
float
>
(
"threshold"
,
"The threshold value of SoftRelu"
)
...
@@ -301,8 +295,7 @@ $out = \ln(1 + \exp(\max(\min(x, threshold), threshold))$
...
@@ -301,8 +295,7 @@ $out = \ln(1 + \exp(\max(\min(x, threshold), threshold))$
class
ELUOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
ELUOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
ELUOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
framework
::
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
"Input of ELU operator"
);
AddInput
(
"X"
,
"Input of ELU operator"
);
AddOutput
(
"Out"
,
"Output of ELU operator"
);
AddOutput
(
"Out"
,
"Output of ELU operator"
);
AddAttr
<
float
>
(
"alpha"
,
"The alpha value of ELU"
).
SetDefault
(
1.0
f
);
AddAttr
<
float
>
(
"alpha"
,
"The alpha value of ELU"
).
SetDefault
(
1.0
f
);
...
@@ -320,8 +313,7 @@ $out = \max(0, x) + \min(0, \alpha * (e^x - 1))$
...
@@ -320,8 +313,7 @@ $out = \max(0, x) + \min(0, \alpha * (e^x - 1))$
class
Relu6OpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
Relu6OpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
Relu6OpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
framework
::
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
"Input of Relu6 operator"
);
AddInput
(
"X"
,
"Input of Relu6 operator"
);
AddOutput
(
"Out"
,
"Output of Relu6 operator"
);
AddOutput
(
"Out"
,
"Output of Relu6 operator"
);
AddAttr
<
float
>
(
"threshold"
,
"The threshold value of Relu6"
)
AddAttr
<
float
>
(
"threshold"
,
"The threshold value of Relu6"
)
...
@@ -337,8 +329,7 @@ $out = \min(\max(0, x), 6)$
...
@@ -337,8 +329,7 @@ $out = \min(\max(0, x), 6)$
class
PowOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
PowOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
PowOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
framework
::
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
"Input of Pow operator"
);
AddInput
(
"X"
,
"Input of Pow operator"
);
AddOutput
(
"Out"
,
"Output of Pow operator"
);
AddOutput
(
"Out"
,
"Output of Pow operator"
);
AddAttr
<
float
>
(
"factor"
,
"The exponential factor of Pow"
).
SetDefault
(
1.0
f
);
AddAttr
<
float
>
(
"factor"
,
"The exponential factor of Pow"
).
SetDefault
(
1.0
f
);
...
@@ -353,8 +344,7 @@ $out = x^{factor}$
...
@@ -353,8 +344,7 @@ $out = x^{factor}$
class
STanhOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
STanhOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
STanhOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
framework
::
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
"Input of STanh operator"
);
AddInput
(
"X"
,
"Input of STanh operator"
);
AddOutput
(
"Out"
,
"Output of STanh operator"
);
AddOutput
(
"Out"
,
"Output of STanh operator"
);
AddAttr
<
float
>
(
"scale_a"
,
"The scale parameter of a for the input"
)
AddAttr
<
float
>
(
"scale_a"
,
"The scale parameter of a for the input"
)
...
@@ -372,8 +362,7 @@ $$out = b * \frac{e^{a * x} - e^{-a * x}}{e^{a * x} + e^{-a * x}}$$
...
@@ -372,8 +362,7 @@ $$out = b * \frac{e^{a * x} - e^{-a * x}}{e^{a * x} + e^{-a * x}}$$
class
ThresholdedReluOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
ThresholdedReluOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
ThresholdedReluOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
framework
::
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
"Input of ThresholdedRelu operator"
);
AddInput
(
"X"
,
"Input of ThresholdedRelu operator"
);
AddOutput
(
"Out"
,
"Output of ThresholdedRelu operator"
);
AddOutput
(
"Out"
,
"Output of ThresholdedRelu operator"
);
AddAttr
<
float
>
(
"threshold"
,
"The threshold location of activation"
)
AddAttr
<
float
>
(
"threshold"
,
"The threshold location of activation"
)
...
@@ -394,8 +383,7 @@ $$
...
@@ -394,8 +383,7 @@ $$
class
HardSigmoidOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
HardSigmoidOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
HardSigmoidOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
framework
::
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
"Input of HardSigmoid operator"
);
AddInput
(
"X"
,
"Input of HardSigmoid operator"
);
AddOutput
(
"Out"
,
"Output of HardSigmoid operator"
);
AddOutput
(
"Out"
,
"Output of HardSigmoid operator"
);
AddAttr
<
float
>
(
"slope"
,
"Slope for linear approximation of sigmoid"
)
AddAttr
<
float
>
(
"slope"
,
"Slope for linear approximation of sigmoid"
)
...
@@ -420,8 +408,7 @@ It is recommended to use the defaults for this activation.
...
@@ -420,8 +408,7 @@ It is recommended to use the defaults for this activation.
class
SwishOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
SwishOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
SwishOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
framework
::
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
"Input of Swish operator"
);
AddInput
(
"X"
,
"Input of Swish operator"
);
AddOutput
(
"Out"
,
"Output of Swish operator"
);
AddOutput
(
"Out"
,
"Output of Swish operator"
);
AddAttr
<
float
>
(
"beta"
,
"Constant beta of swish operator"
).
SetDefault
(
1.0
f
);
AddAttr
<
float
>
(
"beta"
,
"Constant beta of swish operator"
).
SetDefault
(
1.0
f
);
...
...
paddle/fluid/operators/adadelta_op.cc
浏览文件 @
046405e0
...
@@ -66,8 +66,7 @@ class AdadeltaOp : public framework::OperatorWithKernel {
...
@@ -66,8 +66,7 @@ class AdadeltaOp : public framework::OperatorWithKernel {
class
AdadeltaOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
AdadeltaOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
AdadeltaOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"Param"
,
"(Tensor) Input parameter"
);
AddInput
(
"Param"
,
"(Tensor) Input parameter"
);
AddInput
(
"Grad"
,
"(Tensor) Input gradient"
);
AddInput
(
"Grad"
,
"(Tensor) Input gradient"
);
AddInput
(
"AvgSquaredGrad"
,
"(Tensor) Input average of squared gradient"
);
AddInput
(
"AvgSquaredGrad"
,
"(Tensor) Input average of squared gradient"
);
...
...
paddle/fluid/operators/adagrad_op.cc
浏览文件 @
046405e0
...
@@ -67,8 +67,7 @@ class AdagradOp : public framework::OperatorWithKernel {
...
@@ -67,8 +67,7 @@ class AdagradOp : public framework::OperatorWithKernel {
class
AdagradOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
AdagradOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
AdagradOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"Param"
,
"(Tensor) Input parameter"
);
AddInput
(
"Param"
,
"(Tensor) Input parameter"
);
AddInput
(
"Grad"
,
"(Tensor) Input gradient"
);
AddInput
(
"Grad"
,
"(Tensor) Input gradient"
);
AddInput
(
"Moment"
,
"(Tensor) Second moment"
);
AddInput
(
"Moment"
,
"(Tensor) Second moment"
);
...
...
paddle/fluid/operators/adam_op.cc
浏览文件 @
046405e0
...
@@ -80,8 +80,7 @@ class AdamOp : public framework::OperatorWithKernel {
...
@@ -80,8 +80,7 @@ class AdamOp : public framework::OperatorWithKernel {
class
AdamOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
AdamOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
AdamOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"Param"
,
"(Tensor) Input parameter"
);
AddInput
(
"Param"
,
"(Tensor) Input parameter"
);
AddInput
(
"Grad"
,
"(Tensor) Input gradient"
);
AddInput
(
"Grad"
,
"(Tensor) Input gradient"
);
AddInput
(
"LearningRate"
,
"(Tensor) Learning rate"
);
AddInput
(
"LearningRate"
,
"(Tensor) Learning rate"
);
...
...
paddle/fluid/operators/adamax_op.cc
浏览文件 @
046405e0
...
@@ -74,8 +74,7 @@ class AdamaxOp : public framework::OperatorWithKernel {
...
@@ -74,8 +74,7 @@ class AdamaxOp : public framework::OperatorWithKernel {
class
AdamaxOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
AdamaxOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
AdamaxOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"Param"
,
"(Tensor) Input parameter"
);
AddInput
(
"Param"
,
"(Tensor) Input parameter"
);
AddInput
(
"Grad"
,
"(Tensor) Input gradient"
);
AddInput
(
"Grad"
,
"(Tensor) Input gradient"
);
AddInput
(
"LearningRate"
,
"(Tensor) Learning rate"
);
AddInput
(
"LearningRate"
,
"(Tensor) Learning rate"
);
...
...
paddle/fluid/operators/array_to_lod_tensor_op.cc
浏览文件 @
046405e0
...
@@ -123,8 +123,7 @@ class ArrayToLoDTensorOp : public framework::OperatorBase {
...
@@ -123,8 +123,7 @@ class ArrayToLoDTensorOp : public framework::OperatorBase {
class
ArrayToLoDTensorOpProtoMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
ArrayToLoDTensorOpProtoMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
ArrayToLoDTensorOpProtoMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
AddInput
(
"X"
,
"(std::vector<LodTensor>) A vector of tensors that is going to "
"(std::vector<LodTensor>) A vector of tensors that is going to "
"be casted to a big LoDTensor."
);
"be casted to a big LoDTensor."
);
...
...
paddle/fluid/operators/assign_op.cc
浏览文件 @
046405e0
...
@@ -94,8 +94,7 @@ class AssignOp : public framework::OperatorBase {
...
@@ -94,8 +94,7 @@ class AssignOp : public framework::OperatorBase {
class
AssignOpProtoMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
AssignOpProtoMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
AssignOpProtoMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
AddInput
(
"X"
,
"(LoDTensor, SelectedRows or LoDTensorArray) The input variable "
"(LoDTensor, SelectedRows or LoDTensorArray) The input variable "
"could be LoDTensor, SelectedRows or LoDTensorArray."
)
"could be LoDTensor, SelectedRows or LoDTensorArray."
)
...
...
paddle/fluid/operators/assign_value_op.cc
浏览文件 @
046405e0
...
@@ -45,8 +45,7 @@ class AssignValueOp : public framework::OperatorWithKernel {
...
@@ -45,8 +45,7 @@ class AssignValueOp : public framework::OperatorWithKernel {
class
AssignValueOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
AssignValueOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
AssignValueOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddOutput
(
"Out"
,
"(Tensor) Output tensor of assign_value operator."
);
AddOutput
(
"Out"
,
"(Tensor) Output tensor of assign_value operator."
);
AddAttr
<
std
::
vector
<
int
>>
(
"shape"
,
AddAttr
<
std
::
vector
<
int
>>
(
"shape"
,
"(vector<int>) "
"(vector<int>) "
...
...
paddle/fluid/operators/auc_op.cc
浏览文件 @
046405e0
...
@@ -50,8 +50,7 @@ class AucOp : public framework::OperatorWithKernel {
...
@@ -50,8 +50,7 @@ class AucOp : public framework::OperatorWithKernel {
class
AucOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
AucOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
AucOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"Out"
,
AddInput
(
"Out"
,
"A floating point 2D tensor, values are in the range [0, 1]."
"A floating point 2D tensor, values are in the range [0, 1]."
"Each row is sorted in descending order. This input should be the"
"Each row is sorted in descending order. This input should be the"
...
...
paddle/fluid/operators/average_accumulates_op.cc
浏览文件 @
046405e0
...
@@ -111,8 +111,7 @@ class AverageAccumulatesOp : public framework::OperatorWithKernel {
...
@@ -111,8 +111,7 @@ class AverageAccumulatesOp : public framework::OperatorWithKernel {
class
AverageAccumulatesOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
AverageAccumulatesOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
AverageAccumulatesOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"param"
,
"(Tensor), The parameter to be accumulated."
);
AddInput
(
"param"
,
"(Tensor), The parameter to be accumulated."
);
AddInput
(
"in_sum_1"
,
AddInput
(
"in_sum_1"
,
"(Tensor), A tensor used to store the parameter "
"(Tensor), A tensor used to store the parameter "
...
...
paddle/fluid/operators/batch_norm_op.cc
浏览文件 @
046405e0
...
@@ -126,8 +126,7 @@ class BatchNormOp : public framework::OperatorWithKernel {
...
@@ -126,8 +126,7 @@ class BatchNormOp : public framework::OperatorWithKernel {
class
BatchNormOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
BatchNormOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
BatchNormOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddAttr
<
bool
>
(
"is_test"
,
""
).
SetDefault
(
false
);
AddAttr
<
bool
>
(
"is_test"
,
""
).
SetDefault
(
false
);
AddAttr
<
float
>
(
"momentum"
,
""
).
SetDefault
(
0.9
);
AddAttr
<
float
>
(
"momentum"
,
""
).
SetDefault
(
0.9
);
AddAttr
<
float
>
(
"epsilon"
,
""
)
AddAttr
<
float
>
(
"epsilon"
,
""
)
...
...
paddle/fluid/operators/batch_size_like.h
浏览文件 @
046405e0
...
@@ -53,8 +53,7 @@ class BatchSizeLikeOp : public framework::OperatorWithKernel {
...
@@ -53,8 +53,7 @@ class BatchSizeLikeOp : public framework::OperatorWithKernel {
class
BatchSizeLikeOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
BatchSizeLikeOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
BatchSizeLikeOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
final
{
:
framework
::
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"Input"
,
AddInput
(
"Input"
,
"(Tensor) Tensor "
"(Tensor) Tensor "
"whose input_dim_idx'th dimension specifies the batch_size"
);
"whose input_dim_idx'th dimension specifies the batch_size"
);
...
@@ -68,7 +67,11 @@ class BatchSizeLikeOpMaker : public framework::OpProtoAndCheckerMaker {
...
@@ -68,7 +67,11 @@ class BatchSizeLikeOpMaker : public framework::OpProtoAndCheckerMaker {
AddAttr
<
int
>
(
"output_dim_idx"
,
AddAttr
<
int
>
(
"output_dim_idx"
,
"(int, default 0) The index of output's batch size dimension"
)
"(int, default 0) The index of output's batch size dimension"
)
.
SetDefault
(
0
);
.
SetDefault
(
0
);
Apply
();
}
}
protected:
virtual
void
Apply
()
=
0
;
};
};
}
// namespace operators
}
// namespace operators
...
...
paddle/fluid/operators/beam_search_decode_op.cc
浏览文件 @
046405e0
...
@@ -134,8 +134,7 @@ class BeamSearchDecodeOp : public framework::OperatorBase {
...
@@ -134,8 +134,7 @@ class BeamSearchDecodeOp : public framework::OperatorBase {
class
BeamSearchDecodeOpProtoMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
BeamSearchDecodeOpProtoMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
BeamSearchDecodeOpProtoMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
framework
::
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"Ids"
,
AddInput
(
"Ids"
,
"(LodTensorArray)"
"(LodTensorArray)"
"score of the candidate words in each step"
);
"score of the candidate words in each step"
);
...
...
paddle/fluid/operators/beam_search_op.cc
浏览文件 @
046405e0
...
@@ -197,8 +197,7 @@ std::string ItemToString(const BeamSearch::Item &item) {
...
@@ -197,8 +197,7 @@ std::string ItemToString(const BeamSearch::Item &item) {
class
BeamSearchOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
BeamSearchOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
BeamSearchOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
// inputs and outputs stored in proto
// inputs and outputs stored in proto
AddInput
(
"pre_ids"
,
"ids in previous step"
);
AddInput
(
"pre_ids"
,
"ids in previous step"
);
AddInput
(
"ids"
,
"a LoDTensor of shape of [None,k]"
);
AddInput
(
"ids"
,
"a LoDTensor of shape of [None,k]"
);
...
...
paddle/fluid/operators/bilinear_interp_op.cc
浏览文件 @
046405e0
...
@@ -41,8 +41,7 @@ class BilinearInterpOp : public framework::OperatorWithKernel {
...
@@ -41,8 +41,7 @@ class BilinearInterpOp : public framework::OperatorWithKernel {
class
BilinearInterpOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
BilinearInterpOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
BilinearInterpOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
AddInput
(
"X"
,
"(Tensor) The input tensor of bilinear interpolation, "
"(Tensor) The input tensor of bilinear interpolation, "
"This is a 4-D tensor with shape of (N x C x h x w)"
);
"This is a 4-D tensor with shape of (N x C x h x w)"
);
...
...
paddle/fluid/operators/bilinear_tensor_product_op.cc
浏览文件 @
046405e0
...
@@ -65,8 +65,7 @@ class BilinearTensorProductOp : public framework::OperatorWithKernel {
...
@@ -65,8 +65,7 @@ class BilinearTensorProductOp : public framework::OperatorWithKernel {
class
BilinearTensorProductOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
BilinearTensorProductOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
BilinearTensorProductOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
"The first input of bilinear_tensor_product operator."
);
AddInput
(
"X"
,
"The first input of bilinear_tensor_product operator."
);
AddInput
(
"Y"
,
"The second input of bilinear_tensor_product operator."
);
AddInput
(
"Y"
,
"The second input of bilinear_tensor_product operator."
);
AddInput
(
"Weight"
,
AddInput
(
"Weight"
,
...
...
paddle/fluid/operators/bipartite_match_op.cc
浏览文件 @
046405e0
...
@@ -182,8 +182,7 @@ class BipartiteMatchKernel : public framework::OpKernel<T> {
...
@@ -182,8 +182,7 @@ class BipartiteMatchKernel : public framework::OpKernel<T> {
class
BipartiteMatchOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
BipartiteMatchOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
BipartiteMatchOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
AddInput
(
"DistMat"
,
"DistMat"
,
"(LoDTensor or Tensor) this input is a 2-D LoDTensor with shape "
"(LoDTensor or Tensor) this input is a 2-D LoDTensor with shape "
...
...
paddle/fluid/operators/box_coder_op.cc
浏览文件 @
046405e0
...
@@ -60,8 +60,7 @@ class BoxCoderOp : public framework::OperatorWithKernel {
...
@@ -60,8 +60,7 @@ class BoxCoderOp : public framework::OperatorWithKernel {
class
BoxCoderOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
BoxCoderOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
BoxCoderOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
AddInput
(
"PriorBox"
,
"PriorBox"
,
"(Tensor, default Tensor<float>) "
"(Tensor, default Tensor<float>) "
...
...
paddle/fluid/operators/cast_op.cc
浏览文件 @
046405e0
...
@@ -21,8 +21,7 @@ namespace operators {
...
@@ -21,8 +21,7 @@ namespace operators {
class
CastOpProtoMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
CastOpProtoMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
CastOpProtoMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
"The input tensor of cast op"
);
AddInput
(
"X"
,
"The input tensor of cast op"
);
AddOutput
(
"Out"
,
"The output tensor of cast op"
);
AddOutput
(
"Out"
,
"The output tensor of cast op"
);
AddAttr
<
int
>
(
"out_dtype"
,
"output data type"
);
AddAttr
<
int
>
(
"out_dtype"
,
"output data type"
);
...
...
paddle/fluid/operators/channel_close_op.cc
浏览文件 @
046405e0
...
@@ -50,8 +50,7 @@ class ChannelCloseOpOpInferShape : public framework::InferShapeBase {
...
@@ -50,8 +50,7 @@ class ChannelCloseOpOpInferShape : public framework::InferShapeBase {
class
ChannelCloseOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
ChannelCloseOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
ChannelCloseOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
kChannel
,
AddInput
(
kChannel
,
"The Channel Variable that should be closed by"
"The Channel Variable that should be closed by"
" the ChannelClose Op."
);
" the ChannelClose Op."
);
...
...
paddle/fluid/operators/channel_create_op.cc
浏览文件 @
046405e0
...
@@ -91,8 +91,7 @@ class ChannelCreateOpOpInferShape : public framework::InferShapeBase {
...
@@ -91,8 +91,7 @@ class ChannelCreateOpOpInferShape : public framework::InferShapeBase {
class
ChannelCreateOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
ChannelCreateOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
ChannelCreateOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddOutput
(
kOutput
,
AddOutput
(
kOutput
,
"The object of a Channel type created by ChannelCreate Op."
);
"The object of a Channel type created by ChannelCreate Op."
);
AddAttr
<
int
>
(
"capacity"
,
"The size of the buffer of Channel."
)
AddAttr
<
int
>
(
"capacity"
,
"The size of the buffer of Channel."
)
...
...
paddle/fluid/operators/channel_recv_op.cc
浏览文件 @
046405e0
...
@@ -72,8 +72,7 @@ class ChannelRecvOp : public framework::OperatorBase {
...
@@ -72,8 +72,7 @@ class ChannelRecvOp : public framework::OperatorBase {
class
ChannelRecvOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
ChannelRecvOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
ChannelRecvOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
Channel
,
AddInput
(
Channel
,
"(Channel) A variable which
\"
receives
\"
the a value sent"
"(Channel) A variable which
\"
receives
\"
the a value sent"
"to it by a channel_send op."
)
"to it by a channel_send op."
)
...
...
paddle/fluid/operators/channel_send_op.cc
浏览文件 @
046405e0
...
@@ -57,8 +57,7 @@ class ChannelSendOp : public framework::OperatorBase {
...
@@ -57,8 +57,7 @@ class ChannelSendOp : public framework::OperatorBase {
class
ChannelSendOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
ChannelSendOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
ChannelSendOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
Channel
,
AddInput
(
Channel
,
"(Channel) A variable which
\"
sends
\"
the passed in value to "
"(Channel) A variable which
\"
sends
\"
the passed in value to "
"a listening receiver."
)
"a listening receiver."
)
...
...
paddle/fluid/operators/chunk_eval_op.cc
浏览文件 @
046405e0
...
@@ -66,8 +66,7 @@ class ChunkEvalOp : public framework::OperatorWithKernel {
...
@@ -66,8 +66,7 @@ class ChunkEvalOp : public framework::OperatorWithKernel {
class
ChunkEvalOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
ChunkEvalOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
ChunkEvalOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"Inference"
,
AddInput
(
"Inference"
,
"(Tensor, default: Tensor<int64_t>). "
"(Tensor, default: Tensor<int64_t>). "
"Predictions from the network."
);
"Predictions from the network."
);
...
...
paddle/fluid/operators/clip_by_norm_op.cc
浏览文件 @
046405e0
...
@@ -37,8 +37,7 @@ class ClipByNormOp : public framework::OperatorWithKernel {
...
@@ -37,8 +37,7 @@ class ClipByNormOp : public framework::OperatorWithKernel {
class
ClipByNormOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
ClipByNormOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
ClipByNormOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
AddInput
(
"X"
,
"(Tensor) The input of clip_by_norm op."
"(Tensor) The input of clip_by_norm op."
"The number of dimensions must be between [1, 9]."
);
"The number of dimensions must be between [1, 9]."
);
...
...
paddle/fluid/operators/clip_op.cc
浏览文件 @
046405e0
...
@@ -38,8 +38,7 @@ class ClipOp : public framework::OperatorWithKernel {
...
@@ -38,8 +38,7 @@ class ClipOp : public framework::OperatorWithKernel {
template
<
typename
AttrType
>
template
<
typename
AttrType
>
class
ClipOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
ClipOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
ClipOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
AddInput
(
"X"
,
"(Tensor)The input of clip op."
"(Tensor)The input of clip op."
"The number of dimensions must be between [1, 9]."
);
"The number of dimensions must be between [1, 9]."
);
...
...
paddle/fluid/operators/compare_op.cc
浏览文件 @
046405e0
...
@@ -21,8 +21,7 @@ namespace operators {
...
@@ -21,8 +21,7 @@ namespace operators {
template
<
typename
OpComment
>
template
<
typename
OpComment
>
class
CompareOpProtoMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
CompareOpProtoMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
CompareOpProtoMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
OpComment
comment
;
OpComment
comment
;
AddInput
(
"X"
,
AddInput
(
"X"
,
string
::
Sprintf
(
"(LoDTensor) the left hand operand of %s operator"
,
string
::
Sprintf
(
"(LoDTensor) the left hand operand of %s operator"
,
...
...
paddle/fluid/operators/concat_op.cc
浏览文件 @
046405e0
...
@@ -63,8 +63,7 @@ class ConcatOp : public framework::OperatorWithKernel {
...
@@ -63,8 +63,7 @@ class ConcatOp : public framework::OperatorWithKernel {
class
ConcatOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
ConcatOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
ConcatOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
"Input tensors of concat operator."
).
AsDuplicable
();
AddInput
(
"X"
,
"Input tensors of concat operator."
).
AsDuplicable
();
AddOutput
(
"Out"
,
"Output tensor of concat operator."
);
AddOutput
(
"Out"
,
"Output tensor of concat operator."
);
AddAttr
<
int
>
(
"axis"
,
AddAttr
<
int
>
(
"axis"
,
...
...
paddle/fluid/operators/conditional_block_op.cc
浏览文件 @
046405e0
...
@@ -108,8 +108,7 @@ class ConditionalBlockOp : public ConditionalOp {
...
@@ -108,8 +108,7 @@ class ConditionalBlockOp : public ConditionalOp {
class
ConditionalBlockOpProtoMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
ConditionalBlockOpProtoMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
ConditionalBlockOpProtoMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
AddInput
(
"X"
,
"The conditional variable of this operator. If X is empty, the "
"The conditional variable of this operator. If X is empty, the "
"whole sub-block will not be executed."
)
"whole sub-block will not be executed."
)
...
...
paddle/fluid/operators/conv_op.cc
浏览文件 @
046405e0
...
@@ -106,8 +106,7 @@ framework::OpKernelType ConvOp::GetExpectedKernelType(
...
@@ -106,8 +106,7 @@ framework::OpKernelType ConvOp::GetExpectedKernelType(
library
);
library
);
}
}
Conv2DOpMaker
::
Conv2DOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Conv2DOpMaker
::
Make
()
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
AddInput
(
"Input"
,
"Input"
,
"(Tensor) The input tensor of convolution operator. "
"(Tensor) The input tensor of convolution operator. "
...
@@ -200,8 +199,7 @@ $$
...
@@ -200,8 +199,7 @@ $$
)DOC"
);
)DOC"
);
}
}
Conv3DOpMaker
::
Conv3DOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Conv3DOpMaker
::
Make
()
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
AddInput
(
"Input"
,
"Input"
,
"(Tensor) The input tensor of convolution operator. "
"(Tensor) The input tensor of convolution operator. "
...
...
paddle/fluid/operators/conv_op.h
浏览文件 @
046405e0
...
@@ -60,12 +60,12 @@ inline bool IsExpand(const std::vector<int64_t>& filter_dim,
...
@@ -60,12 +60,12 @@ inline bool IsExpand(const std::vector<int64_t>& filter_dim,
// operator implementations can reuse the code.
// operator implementations can reuse the code.
class
Conv2DOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
Conv2DOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
Conv2DOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
;
void
Make
()
override
;
};
};
class
Conv3DOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
Conv3DOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
Conv3DOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
;
void
Make
()
override
;
};
};
class
ConvOp
:
public
framework
::
OperatorWithKernel
{
class
ConvOp
:
public
framework
::
OperatorWithKernel
{
...
...
paddle/fluid/operators/conv_shift_op.cc
浏览文件 @
046405e0
...
@@ -75,8 +75,7 @@ class ConvShiftGradOp : public framework::OperatorWithKernel {
...
@@ -75,8 +75,7 @@ class ConvShiftGradOp : public framework::OperatorWithKernel {
class
ConvShiftOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
ConvShiftOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
ConvShiftOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
framework
::
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
AddInput
(
"X"
,
"(Tensor, default Tensor<float>), a 2-D tensor with shape B x M, "
"(Tensor, default Tensor<float>), a 2-D tensor with shape B x M, "
"where B is the batch size and M is the data dimension."
);
"where B is the batch size and M is the data dimension."
);
...
...
paddle/fluid/operators/conv_transpose_op.cc
浏览文件 @
046405e0
...
@@ -84,9 +84,7 @@ framework::OpKernelType ConvTransposeOp::GetExpectedKernelType(
...
@@ -84,9 +84,7 @@ framework::OpKernelType ConvTransposeOp::GetExpectedKernelType(
layout_
,
library_
);
layout_
,
library_
);
}
}
Conv2DTransposeOpMaker
::
Conv2DTransposeOpMaker
(
OpProto
*
proto
,
void
Conv2DTransposeOpMaker
::
Make
()
{
OpAttrChecker
*
op_checker
)
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
AddInput
(
"Input"
,
"Input"
,
"(Tensor) The input tensor of convolution transpose operator. "
"(Tensor) The input tensor of convolution transpose operator. "
...
@@ -168,9 +166,7 @@ Example:
...
@@ -168,9 +166,7 @@ Example:
)DOC"
);
)DOC"
);
}
}
Conv3DTransposeOpMaker
::
Conv3DTransposeOpMaker
(
OpProto
*
proto
,
void
Conv3DTransposeOpMaker
::
Make
()
{
OpAttrChecker
*
op_checker
)
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"Input"
,
AddInput
(
"Input"
,
"(Tensor) The input tensor of convolution transpose operator."
"(Tensor) The input tensor of convolution transpose operator."
"The format of input tensor is NCDHW. Where N is batch size, C is "
"The format of input tensor is NCDHW. Where N is batch size, C is "
...
...
paddle/fluid/operators/conv_transpose_op.h
浏览文件 @
046405e0
...
@@ -30,12 +30,12 @@ using DDim = framework::DDim;
...
@@ -30,12 +30,12 @@ using DDim = framework::DDim;
// operator implementations can reuse the code.
// operator implementations can reuse the code.
class
Conv2DTransposeOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
Conv2DTransposeOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
Conv2DTransposeOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
;
void
Make
()
override
;
};
};
class
Conv3DTransposeOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
Conv3DTransposeOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
Conv3DTransposeOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
;
void
Make
()
override
;
};
};
class
ConvTransposeOp
:
public
framework
::
OperatorWithKernel
{
class
ConvTransposeOp
:
public
framework
::
OperatorWithKernel
{
...
...
paddle/fluid/operators/cos_sim_op.cc
浏览文件 @
046405e0
...
@@ -62,8 +62,7 @@ class CosSimOp : public framework::OperatorWithKernel {
...
@@ -62,8 +62,7 @@ class CosSimOp : public framework::OperatorWithKernel {
class
CosSimOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
CosSimOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
CosSimOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
"The 1st input of cos_sim op."
);
AddInput
(
"X"
,
"The 1st input of cos_sim op."
);
AddInput
(
"Y"
,
"The 2nd input of cos_sim op."
);
AddInput
(
"Y"
,
"The 2nd input of cos_sim op."
);
AddOutput
(
"Out"
,
"The output of cos_sim op."
);
AddOutput
(
"Out"
,
"The output of cos_sim op."
);
...
...
paddle/fluid/operators/crf_decoding_op.cc
浏览文件 @
046405e0
...
@@ -18,8 +18,7 @@ namespace paddle {
...
@@ -18,8 +18,7 @@ namespace paddle {
namespace
operators
{
namespace
operators
{
class
CRFDecodingOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
CRFDecodingOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
CRFDecodingOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"Emission"
,
AddInput
(
"Emission"
,
"(LoDTensor, default: LoDTensor<float>). A LoDTensor with shape "
"(LoDTensor, default: LoDTensor<float>). A LoDTensor with shape "
"[N x D] where N is the size of the mini-batch and D is the total "
"[N x D] where N is the size of the mini-batch and D is the total "
...
...
paddle/fluid/operators/crop_op.cc
浏览文件 @
046405e0
...
@@ -52,8 +52,7 @@ class CropOp : public framework::OperatorWithKernel {
...
@@ -52,8 +52,7 @@ class CropOp : public framework::OperatorWithKernel {
class
CropOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
CropOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
CropOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
AddInput
(
"X"
,
"The input of pad op. "
"The input of pad op. "
"The input should be a k-D tensor(k > 0 and k < 7)."
);
"The input should be a k-D tensor(k > 0 and k < 7)."
);
...
...
paddle/fluid/operators/cross_entropy_op.cc
浏览文件 @
046405e0
...
@@ -111,8 +111,7 @@ class CrossEntropyGradientOp : public framework::OperatorWithKernel {
...
@@ -111,8 +111,7 @@ class CrossEntropyGradientOp : public framework::OperatorWithKernel {
class
CrossEntropyOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
CrossEntropyOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
CrossEntropyOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
AddInput
(
"X"
,
"(Tensor, default Tensor<float>), a 2-D tensor with shape [N x D],"
"(Tensor, default Tensor<float>), a 2-D tensor with shape [N x D],"
" where N is the batch size and D is the number of classes. "
" where N is the batch size and D is the number of classes. "
...
...
paddle/fluid/operators/ctc_align_op.cc
浏览文件 @
046405e0
...
@@ -44,8 +44,7 @@ class CTCAlignOp : public framework::OperatorWithKernel {
...
@@ -44,8 +44,7 @@ class CTCAlignOp : public framework::OperatorWithKernel {
class
CTCAlignOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
CTCAlignOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
CTCAlignOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"Input"
,
AddInput
(
"Input"
,
"(LodTensor, default: LoDTensor<int>), Its shape is "
"(LodTensor, default: LoDTensor<int>), Its shape is "
"[Lp, 1], where Lp is the sum of all input sequences' length."
);
"[Lp, 1], where Lp is the sum of all input sequences' length."
);
...
...
paddle/fluid/operators/cumsum_op.cc
浏览文件 @
046405e0
...
@@ -29,8 +29,7 @@ class CumOp : public framework::OperatorWithKernel {
...
@@ -29,8 +29,7 @@ class CumOp : public framework::OperatorWithKernel {
class
CumsumOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
CumsumOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
CumsumOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
framework
::
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
"Input of Cumsum operator"
);
AddInput
(
"X"
,
"Input of Cumsum operator"
);
AddOutput
(
"Out"
,
"Output of Cumsum operator"
);
AddOutput
(
"Out"
,
"Output of Cumsum operator"
);
AddAttr
<
int
>
(
"axis"
,
AddAttr
<
int
>
(
"axis"
,
...
...
paddle/fluid/operators/decayed_adagrad_op.cc
浏览文件 @
046405e0
...
@@ -62,8 +62,7 @@ class DecayedAdagradOp : public framework::OperatorWithKernel {
...
@@ -62,8 +62,7 @@ class DecayedAdagradOp : public framework::OperatorWithKernel {
class
DecayedAdagradOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
DecayedAdagradOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
DecayedAdagradOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"Param"
,
"(Tensor) Input parameter"
);
AddInput
(
"Param"
,
"(Tensor) Input parameter"
);
AddInput
(
"Grad"
,
"(Tensor) Input gradient"
);
AddInput
(
"Grad"
,
"(Tensor) Input gradient"
);
AddInput
(
"Moment"
,
"(Tensor) Second moment"
);
AddInput
(
"Moment"
,
"(Tensor) Second moment"
);
...
...
paddle/fluid/operators/delete_var_op.cc
浏览文件 @
046405e0
...
@@ -34,8 +34,7 @@ class DeleteVarOp : public framework::OperatorBase {
...
@@ -34,8 +34,7 @@ class DeleteVarOp : public framework::OperatorBase {
class
DeleteVarOpInfoMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
DeleteVarOpInfoMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
DeleteVarOpInfoMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
"The input of delete op"
).
AsDuplicable
();
AddInput
(
"X"
,
"The input of delete op"
).
AsDuplicable
();
AddComment
(
R"DOC(
AddComment
(
R"DOC(
Delete Operator.
Delete Operator.
...
...
paddle/fluid/operators/detection_map_op.cc
浏览文件 @
046405e0
...
@@ -78,8 +78,7 @@ class DetectionMAPOp : public framework::OperatorWithKernel {
...
@@ -78,8 +78,7 @@ class DetectionMAPOp : public framework::OperatorWithKernel {
class
DetectionMAPOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
DetectionMAPOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
DetectionMAPOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"DetectRes"
,
AddInput
(
"DetectRes"
,
"(LoDTensor) A 2-D LoDTensor with shape [M, 6] represents the "
"(LoDTensor) A 2-D LoDTensor with shape [M, 6] represents the "
"detections. Each row has 6 values: "
"detections. Each row has 6 values: "
...
...
paddle/fluid/operators/dropout_op.cc
浏览文件 @
046405e0
...
@@ -37,8 +37,7 @@ class DropoutOp : public framework::OperatorWithKernel {
...
@@ -37,8 +37,7 @@ class DropoutOp : public framework::OperatorWithKernel {
class
DropoutOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
DropoutOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
DropoutOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
"The input of dropout op."
);
AddInput
(
"X"
,
"The input of dropout op."
);
AddOutput
(
"Out"
,
"The output of dropout op."
);
AddOutput
(
"Out"
,
"The output of dropout op."
);
AddOutput
(
"Mask"
,
"The random sampled dropout mask."
).
AsIntermediate
();
AddOutput
(
"Mask"
,
"The random sampled dropout mask."
).
AsIntermediate
();
...
...
paddle/fluid/operators/edit_distance_op.cc
浏览文件 @
046405e0
...
@@ -49,8 +49,7 @@ class EditDistanceOp : public framework::OperatorWithKernel {
...
@@ -49,8 +49,7 @@ class EditDistanceOp : public framework::OperatorWithKernel {
class
EditDistanceOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
EditDistanceOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
EditDistanceOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"Hyps"
,
AddInput
(
"Hyps"
,
"(2-D LoDTensor<int64_t>, 2nd dim. equal to 1) "
"(2-D LoDTensor<int64_t>, 2nd dim. equal to 1) "
"The indices for hypothesis strings."
);
"The indices for hypothesis strings."
);
...
...
paddle/fluid/operators/elementwise_add_op.cc
浏览文件 @
046405e0
...
@@ -14,26 +14,8 @@ limitations under the License. */
...
@@ -14,26 +14,8 @@ limitations under the License. */
#include "paddle/fluid/operators/elementwise_add_op.h"
#include "paddle/fluid/operators/elementwise_add_op.h"
#include "paddle/fluid/operators/elementwise_op.h"
#include "paddle/fluid/operators/elementwise_op.h"
namespace
paddle
{
namespace
operators
{
class
ElementwiseAddOpMaker
:
public
ElementwiseOpMaker
{
public:
ElementwiseAddOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
:
ElementwiseOpMaker
(
proto
,
op_checker
)
{
SetComment
(
"Add"
,
"Out = X + Y"
);
AddComment
(
comment_
);
}
};
}
// namespace operators
}
// namespace paddle
namespace
ops
=
paddle
::
operators
;
namespace
ops
=
paddle
::
operators
;
REGISTER_OPERATOR
(
elementwise_add
,
ops
::
ElementwiseOp
,
REGISTER_ELEMWISE_OP
(
elementwise_add
,
"Add"
,
"Out = X + Y"
);
ops
::
ElementwiseAddOpMaker
,
ops
::
ElementwiseOpInferVarType
,
paddle
::
framework
::
DefaultGradOpDescMaker
<
true
>
);
REGISTER_OPERATOR
(
elementwise_add_grad
,
ops
::
ElementwiseOpGrad
);
REGISTER_OP_CPU_KERNEL
(
REGISTER_OP_CPU_KERNEL
(
elementwise_add
,
elementwise_add
,
ops
::
ElementwiseAddKernel
<
paddle
::
platform
::
CPUDeviceContext
,
float
>
,
ops
::
ElementwiseAddKernel
<
paddle
::
platform
::
CPUDeviceContext
,
float
>
,
...
...
paddle/fluid/operators/elementwise_div_op.cc
浏览文件 @
046405e0
...
@@ -14,26 +14,8 @@ limitations under the License. */
...
@@ -14,26 +14,8 @@ limitations under the License. */
#include "paddle/fluid/operators/elementwise_div_op.h"
#include "paddle/fluid/operators/elementwise_div_op.h"
#include "paddle/fluid/operators/elementwise_op.h"
#include "paddle/fluid/operators/elementwise_op.h"
namespace
paddle
{
namespace
operators
{
class
ElementwiseDivOpMaker
:
public
ElementwiseOpMaker
{
public:
ElementwiseDivOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
:
ElementwiseOpMaker
(
proto
,
op_checker
)
{
SetComment
(
"Div"
,
"Out = X / Y"
);
AddComment
(
comment_
);
}
};
}
// namespace operators
}
// namespace paddle
namespace
ops
=
paddle
::
operators
;
namespace
ops
=
paddle
::
operators
;
REGISTER_OPERATOR
(
elementwise_div
,
ops
::
ElementwiseOp
,
REGISTER_ELEMWISE_OP
(
elementwise_div
,
"Div"
,
"Out = X / Y"
);
ops
::
ElementwiseDivOpMaker
,
paddle
::
framework
::
DefaultGradOpDescMaker
<
true
>
);
REGISTER_OPERATOR
(
elementwise_div_grad
,
ops
::
ElementwiseOpGrad
);
REGISTER_OP_CPU_KERNEL
(
REGISTER_OP_CPU_KERNEL
(
elementwise_div
,
elementwise_div
,
ops
::
ElementwiseDivKernel
<
paddle
::
platform
::
CPUDeviceContext
,
float
>
,
ops
::
ElementwiseDivKernel
<
paddle
::
platform
::
CPUDeviceContext
,
float
>
,
...
...
paddle/fluid/operators/elementwise_max_op.cc
浏览文件 @
046405e0
...
@@ -14,25 +14,8 @@ limitations under the License. */
...
@@ -14,25 +14,8 @@ limitations under the License. */
#include "paddle/fluid/operators/elementwise_max_op.h"
#include "paddle/fluid/operators/elementwise_max_op.h"
#include "paddle/fluid/operators/elementwise_op.h"
#include "paddle/fluid/operators/elementwise_op.h"
namespace
paddle
{
namespace
operators
{
class
ElementwiseMaxOpMaker
:
public
ElementwiseOpMaker
{
public:
ElementwiseMaxOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
:
ElementwiseOpMaker
(
proto
,
op_checker
)
{
SetComment
(
"Max"
,
"Out = max(X, Y)"
);
AddComment
(
comment_
);
}
};
}
// namespace operators
}
// namespace paddle
namespace
ops
=
paddle
::
operators
;
namespace
ops
=
paddle
::
operators
;
REGISTER_OPERATOR
(
elementwise_max
,
ops
::
ElementwiseOp
,
REGISTER_ELEMWISE_OP
(
elementwise_max
,
"Max"
,
"Out = max(X, Y)"
);
ops
::
ElementwiseMaxOpMaker
,
paddle
::
framework
::
DefaultGradOpDescMaker
<
true
>
);
REGISTER_OPERATOR
(
elementwise_max_grad
,
ops
::
ElementwiseOpGrad
);
REGISTER_OP_CPU_KERNEL
(
REGISTER_OP_CPU_KERNEL
(
elementwise_max
,
elementwise_max
,
ops
::
ElementwiseMaxKernel
<
paddle
::
platform
::
CPUDeviceContext
,
float
>
,
ops
::
ElementwiseMaxKernel
<
paddle
::
platform
::
CPUDeviceContext
,
float
>
,
...
...
paddle/fluid/operators/elementwise_min_op.cc
浏览文件 @
046405e0
...
@@ -14,25 +14,8 @@ limitations under the License. */
...
@@ -14,25 +14,8 @@ limitations under the License. */
#include "paddle/fluid/operators/elementwise_min_op.h"
#include "paddle/fluid/operators/elementwise_min_op.h"
#include "paddle/fluid/operators/elementwise_op.h"
#include "paddle/fluid/operators/elementwise_op.h"
namespace
paddle
{
namespace
operators
{
class
ElementwiseMinOpMaker
:
public
ElementwiseOpMaker
{
public:
ElementwiseMinOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
:
ElementwiseOpMaker
(
proto
,
op_checker
)
{
SetComment
(
"Max"
,
"Out = min(X, Y)"
);
AddComment
(
comment_
);
}
};
}
// namespace operators
}
// namespace paddle
namespace
ops
=
paddle
::
operators
;
namespace
ops
=
paddle
::
operators
;
REGISTER_OPERATOR
(
elementwise_min
,
ops
::
ElementwiseOp
,
REGISTER_ELEMWISE_OP
(
elementwise_min
,
"Min"
,
"Out = min(X, Y)"
);
ops
::
ElementwiseMinOpMaker
,
paddle
::
framework
::
DefaultGradOpDescMaker
<
true
>
);
REGISTER_OPERATOR
(
elementwise_min_grad
,
ops
::
ElementwiseOpGrad
);
REGISTER_OP_CPU_KERNEL
(
REGISTER_OP_CPU_KERNEL
(
elementwise_min
,
elementwise_min
,
ops
::
ElementwiseMinKernel
<
paddle
::
platform
::
CPUDeviceContext
,
float
>
,
ops
::
ElementwiseMinKernel
<
paddle
::
platform
::
CPUDeviceContext
,
float
>
,
...
...
paddle/fluid/operators/elementwise_mul_op.cc
浏览文件 @
046405e0
...
@@ -14,27 +14,8 @@ limitations under the License. */
...
@@ -14,27 +14,8 @@ limitations under the License. */
#include "paddle/fluid/operators/elementwise_mul_op.h"
#include "paddle/fluid/operators/elementwise_mul_op.h"
#include "paddle/fluid/operators/elementwise_op.h"
#include "paddle/fluid/operators/elementwise_op.h"
namespace
paddle
{
namespace
operators
{
class
ElementwiseMulOpMaker
:
public
ElementwiseOpMaker
{
public:
ElementwiseMulOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
:
ElementwiseOpMaker
(
proto
,
op_checker
)
{
SetComment
(
"Mul"
,
"Out = X
\\
odot
\\
Y"
);
AddComment
(
comment_
);
}
};
}
// namespace operators
}
// namespace paddle
namespace
ops
=
paddle
::
operators
;
namespace
ops
=
paddle
::
operators
;
REGISTER_OPERATOR
(
elementwise_mul
,
ops
::
ElementwiseOp
,
REGISTER_ELEMWISE_OP
(
elementwise_mul
,
"Mul"
,
"Out = X
\\
odot
\\
Y"
);
ops
::
ElementwiseMulOpMaker
,
paddle
::
framework
::
DefaultGradOpDescMaker
<
true
>
);
REGISTER_OPERATOR
(
elementwise_mul_grad
,
ops
::
ElementwiseOpGrad
);
REGISTER_OP_CPU_KERNEL
(
REGISTER_OP_CPU_KERNEL
(
elementwise_mul
,
elementwise_mul
,
ops
::
ElementwiseMulKernel
<
paddle
::
platform
::
CPUDeviceContext
,
float
>
,
ops
::
ElementwiseMulKernel
<
paddle
::
platform
::
CPUDeviceContext
,
float
>
,
...
...
paddle/fluid/operators/elementwise_op.h
浏览文件 @
046405e0
...
@@ -54,8 +54,7 @@ class ElementwiseOpInferVarType : public framework::VarTypeInference {
...
@@ -54,8 +54,7 @@ class ElementwiseOpInferVarType : public framework::VarTypeInference {
class
ElementwiseOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
ElementwiseOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
ElementwiseOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
final
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
"(Tensor), The first input tensor of elementwise op."
);
AddInput
(
"X"
,
"(Tensor), The first input tensor of elementwise op."
);
AddInput
(
"Y"
,
"(Tensor), The second input tensor of elementwise op."
);
AddInput
(
"Y"
,
"(Tensor), The second input tensor of elementwise op."
);
AddOutput
(
"Out"
,
"The output of elementwise op."
);
AddOutput
(
"Out"
,
"The output of elementwise op."
);
...
@@ -64,12 +63,12 @@ class ElementwiseOpMaker : public framework::OpProtoAndCheckerMaker {
...
@@ -64,12 +63,12 @@ class ElementwiseOpMaker : public framework::OpProtoAndCheckerMaker {
"for broadcasting Y onto X."
)
"for broadcasting Y onto X."
)
.
SetDefault
(
-
1
)
.
SetDefault
(
-
1
)
.
EqualGreaterThan
(
-
1
);
.
EqualGreaterThan
(
-
1
);
comment_
=
R"DOC(
AddComment
(
string
::
Sprintf
(
R"DOC(
Limited Elementwise
{name}
Operator.
Limited Elementwise
%s
Operator.
The equation is:
The equation is:
$$
{equation}
$$
$$
%s
$$
$X$ is a tensor of any dimension and the dimensions of tensor $Y$ must be
$X$ is a tensor of any dimension and the dimensions of tensor $Y$ must be
smaller than or equal to the dimensions of $X$.
smaller than or equal to the dimensions of $X$.
...
@@ -100,26 +99,13 @@ For example
...
@@ -100,26 +99,13 @@ For example
Either of the inputs $X$ and $Y$ or none can carry the LoD (Level of Details)
Either of the inputs $X$ and $Y$ or none can carry the LoD (Level of Details)
information. However, the output only shares the LoD information with input $X$.
information. However, the output only shares the LoD information with input $X$.
)DOC"
;
)DOC"
,
AddComment
(
comment_
);
GetName
(),
GetEquation
())
);
}
}
protected:
protected:
std
::
string
comment_
;
virtual
std
::
string
GetName
()
const
=
0
;
virtual
std
::
string
GetEquation
()
const
=
0
;
void
Replace
(
std
::
string
*
src
,
std
::
string
from
,
std
::
string
to
)
{
std
::
size_t
len_from
=
std
::
strlen
(
from
.
c_str
());
std
::
size_t
len_to
=
std
::
strlen
(
to
.
c_str
());
for
(
std
::
size_t
pos
=
src
->
find
(
from
);
pos
!=
std
::
string
::
npos
;
pos
=
src
->
find
(
from
,
pos
+
len_to
))
{
src
->
replace
(
pos
,
len_from
,
to
);
}
}
void
SetComment
(
std
::
string
name
,
std
::
string
equation
)
{
Replace
(
&
comment_
,
"{name}"
,
name
);
Replace
(
&
comment_
,
"{equation}"
,
equation
);
}
};
};
class
ElementwiseOpGrad
:
public
framework
::
OperatorWithKernel
{
class
ElementwiseOpGrad
:
public
framework
::
OperatorWithKernel
{
...
@@ -152,3 +138,16 @@ class ElementwiseOpGrad : public framework::OperatorWithKernel {
...
@@ -152,3 +138,16 @@ class ElementwiseOpGrad : public framework::OperatorWithKernel {
};
};
}
// namespace operators
}
// namespace operators
}
// namespace paddle
}
// namespace paddle
#define REGISTER_ELEMWISE_OP(op_type, op_name, equation) \
class __ElemwiseOp##op_type##Maker__ \
: public ::paddle::operators::ElementwiseOpMaker { \
protected: \
virtual std::string GetName() const { return op_name; } \
virtual std::string GetEquation() const { return equation; } \
}; \
REGISTER_OPERATOR(op_type, ::paddle::operators::ElementwiseOp, \
__ElemwiseOp##op_type##Maker__, \
::paddle::operators::ElementwiseOpInferVarType, \
::paddle::framework::DefaultGradOpDescMaker<true>); \
REGISTER_OPERATOR(op_type##_grad, ::paddle::operators::ElementwiseOpGrad)
paddle/fluid/operators/elementwise_pow_op.cc
浏览文件 @
046405e0
...
@@ -13,17 +13,15 @@ See the License for the specific language governing permissions and
...
@@ -13,17 +13,15 @@ See the License for the specific language governing permissions and
limitations under the License. */
limitations under the License. */
#include "paddle/fluid/operators/elementwise_pow_op.h"
#include "paddle/fluid/operators/elementwise_pow_op.h"
#include <string>
#include "paddle/fluid/operators/elementwise_op.h"
#include "paddle/fluid/operators/elementwise_op.h"
namespace
paddle
{
namespace
paddle
{
namespace
operators
{
namespace
operators
{
class
ElementwisePowOpMaker
:
public
ElementwiseOpMaker
{
class
ElementwisePowOpMaker
:
public
ElementwiseOpMaker
{
public:
protected:
ElementwisePowOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
std
::
string
GetName
()
const
override
{
return
"Pow"
;
}
:
ElementwiseOpMaker
(
proto
,
op_checker
)
{
std
::
string
GetEquation
()
const
override
{
return
"Out = X ^ Y"
;
}
SetComment
(
"Pow"
,
"Out = X ^ Y"
);
AddComment
(
comment_
);
}
};
};
}
// namespace operators
}
// namespace operators
}
// namespace paddle
}
// namespace paddle
...
...
paddle/fluid/operators/elementwise_sub_op.cc
浏览文件 @
046405e0
...
@@ -14,25 +14,8 @@ limitations under the License. */
...
@@ -14,25 +14,8 @@ limitations under the License. */
#include "paddle/fluid/operators/elementwise_sub_op.h"
#include "paddle/fluid/operators/elementwise_sub_op.h"
#include "paddle/fluid/operators/elementwise_op.h"
#include "paddle/fluid/operators/elementwise_op.h"
namespace
paddle
{
namespace
operators
{
class
ElementwiseSubOpMaker
:
public
ElementwiseOpMaker
{
public:
ElementwiseSubOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
:
ElementwiseOpMaker
(
proto
,
op_checker
)
{
SetComment
(
"Sub"
,
"Out = X - Y"
);
AddComment
(
comment_
);
}
};
}
// namespace operators
}
// namespace paddle
namespace
ops
=
paddle
::
operators
;
namespace
ops
=
paddle
::
operators
;
REGISTER_OPERATOR
(
elementwise_sub
,
ops
::
ElementwiseOp
,
REGISTER_ELEMWISE_OP
(
elementwise_sub
,
"Sub"
,
"Out = X - Y"
);
ops
::
ElementwiseSubOpMaker
,
paddle
::
framework
::
DefaultGradOpDescMaker
<
true
>
);
REGISTER_OPERATOR
(
elementwise_sub_grad
,
ops
::
ElementwiseOpGrad
);
REGISTER_OP_CPU_KERNEL
(
REGISTER_OP_CPU_KERNEL
(
elementwise_sub
,
elementwise_sub
,
ops
::
ElementwiseSubKernel
<
paddle
::
platform
::
CPUDeviceContext
,
float
>
,
ops
::
ElementwiseSubKernel
<
paddle
::
platform
::
CPUDeviceContext
,
float
>
,
...
...
paddle/fluid/operators/expand_op.cc
浏览文件 @
046405e0
...
@@ -56,8 +56,7 @@ class ExpandOp : public framework::OperatorWithKernel {
...
@@ -56,8 +56,7 @@ class ExpandOp : public framework::OperatorWithKernel {
class
ExpandOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
ExpandOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
ExpandOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
AddInput
(
"X"
,
"(Tensor, default Tensor<float>). A tensor with rank in [1, 6]."
"(Tensor, default Tensor<float>). A tensor with rank in [1, 6]."
"X is the input to be expanded."
);
"X is the input to be expanded."
);
...
...
paddle/fluid/operators/fc_op.cc
浏览文件 @
046405e0
...
@@ -72,8 +72,7 @@ framework::OpKernelType FCOpGrad::GetExpectedKernelType(
...
@@ -72,8 +72,7 @@ framework::OpKernelType FCOpGrad::GetExpectedKernelType(
layout
,
library
);
layout
,
library
);
}
}
FCOpMaker
::
FCOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
FCOpMaker
::
Make
()
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"Input"
,
"(Tensor) The input tensor of fully connected operator. "
);
AddInput
(
"Input"
,
"(Tensor) The input tensor of fully connected operator. "
);
AddInput
(
"W"
,
"(Tensor), The second input tensor of fc op."
);
AddInput
(
"W"
,
"(Tensor), The second input tensor of fc op."
);
AddOutput
(
"Out"
,
"(Tensor) The output tensor of fully connected operator. "
);
AddOutput
(
"Out"
,
"(Tensor) The output tensor of fully connected operator. "
);
...
...
paddle/fluid/operators/fc_op.h
浏览文件 @
046405e0
...
@@ -45,7 +45,7 @@ class FCOpGrad : public framework::OperatorWithKernel {
...
@@ -45,7 +45,7 @@ class FCOpGrad : public framework::OperatorWithKernel {
class
FCOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
FCOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
FCOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
;
void
Make
()
override
;
};
};
}
// namespace operators
}
// namespace operators
...
...
paddle/fluid/operators/feed_op.cc
浏览文件 @
046405e0
...
@@ -66,8 +66,7 @@ class FeedOp : public framework::OperatorBase {
...
@@ -66,8 +66,7 @@ class FeedOp : public framework::OperatorBase {
class
FeedOpInfoMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
FeedOpInfoMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
FeedOpInfoMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
"The input of feed op"
);
AddInput
(
"X"
,
"The input of feed op"
);
AddOutput
(
"Out"
,
"The output of feed op"
);
AddOutput
(
"Out"
,
"The output of feed op"
);
AddAttr
<
int
>
(
"col"
,
"(int) The column of feed"
);
AddAttr
<
int
>
(
"col"
,
"(int) The column of feed"
);
...
...
paddle/fluid/operators/fetch_op.cc
浏览文件 @
046405e0
...
@@ -66,8 +66,7 @@ class FetchOp : public framework::OperatorBase {
...
@@ -66,8 +66,7 @@ class FetchOp : public framework::OperatorBase {
class
FetchOpInfoMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
FetchOpInfoMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
FetchOpInfoMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
"The input of fetch op"
);
AddInput
(
"X"
,
"The input of fetch op"
);
AddOutput
(
"Out"
,
"The output of fetch op"
);
AddOutput
(
"Out"
,
"The output of fetch op"
);
AddAttr
<
int
>
(
"col"
,
"(int) The column of fetch"
);
AddAttr
<
int
>
(
"col"
,
"(int) The column of fetch"
);
...
...
paddle/fluid/operators/fill_constant_batch_size_like_op.cc
浏览文件 @
046405e0
...
@@ -30,9 +30,8 @@ class FillConstantBatchSizeLikeOp : public BatchSizeLikeOp {
...
@@ -30,9 +30,8 @@ class FillConstantBatchSizeLikeOp : public BatchSizeLikeOp {
};
};
class
FillConstantBatchSizeLikeOpMaker
:
public
BatchSizeLikeOpMaker
{
class
FillConstantBatchSizeLikeOpMaker
:
public
BatchSizeLikeOpMaker
{
public:
protected:
FillConstantBatchSizeLikeOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Apply
()
override
{
:
BatchSizeLikeOpMaker
(
proto
,
op_checker
)
{
AddAttr
<
int
>
(
"dtype"
,
AddAttr
<
int
>
(
"dtype"
,
"(int, default 5 (FP32)) "
"(int, default 5 (FP32)) "
"Output data type"
)
"Output data type"
)
...
...
paddle/fluid/operators/fill_constant_op.cc
浏览文件 @
046405e0
...
@@ -59,8 +59,7 @@ class FillConstantOp : public framework::OperatorBase {
...
@@ -59,8 +59,7 @@ class FillConstantOp : public framework::OperatorBase {
class
FillConstantOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
FillConstantOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
FillConstantOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
framework
::
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddAttr
<
int
>
(
"dtype"
,
AddAttr
<
int
>
(
"dtype"
,
"(int, default 5 (FP32)) "
"(int, default 5 (FP32)) "
"Output data type"
)
"Output data type"
)
...
...
paddle/fluid/operators/fill_op.cc
浏览文件 @
046405e0
...
@@ -82,8 +82,7 @@ class FillOp : public framework::OperatorBase {
...
@@ -82,8 +82,7 @@ class FillOp : public framework::OperatorBase {
class
FillOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
FillOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
FillOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddComment
(
R"DOC(Fill operator
AddComment
(
R"DOC(Fill operator
Fill an tensor with `value` and `shape`. The type of the tensor is specify by
Fill an tensor with `value` and `shape`. The type of the tensor is specify by
...
...
paddle/fluid/operators/fill_zeros_like_op.cc
浏览文件 @
046405e0
...
@@ -33,8 +33,7 @@ class FillZerosLikeOp : public framework::OperatorWithKernel {
...
@@ -33,8 +33,7 @@ class FillZerosLikeOp : public framework::OperatorWithKernel {
class
FillZerosLikeOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
FillZerosLikeOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
FillZerosLikeOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
framework
::
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
"The input of fill-zeros-like op."
);
AddInput
(
"X"
,
"The input of fill-zeros-like op."
);
AddOutput
(
"Out"
,
"The variable will be filled up with zeros."
);
AddOutput
(
"Out"
,
"The variable will be filled up with zeros."
);
AddComment
(
R"DOC(
AddComment
(
R"DOC(
...
...
paddle/fluid/operators/ftrl_op.cc
浏览文件 @
046405e0
...
@@ -64,8 +64,7 @@ class FTRLOp : public framework::OperatorWithKernel {
...
@@ -64,8 +64,7 @@ class FTRLOp : public framework::OperatorWithKernel {
class
FTRLOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
FTRLOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
FTRLOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"Param"
,
AddInput
(
"Param"
,
"(Tensor, default Tensor<float>) "
"(Tensor, default Tensor<float>) "
"Input parameter value that has to be updated."
);
"Input parameter value that has to be updated."
);
...
...
paddle/fluid/operators/gather_op.cc
浏览文件 @
046405e0
...
@@ -67,8 +67,7 @@ class GatherGradOp : public framework::OperatorWithKernel {
...
@@ -67,8 +67,7 @@ class GatherGradOp : public framework::OperatorWithKernel {
class
GatherOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
GatherOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
GatherOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
"The source input of gather op"
);
AddInput
(
"X"
,
"The source input of gather op"
);
AddInput
(
"Index"
,
"The index input of gather op"
);
AddInput
(
"Index"
,
"The index input of gather op"
);
AddOutput
(
"Out"
,
"The output of gather op"
);
AddOutput
(
"Out"
,
"The output of gather op"
);
...
...
paddle/fluid/operators/gaussian_random_batch_size_like_op.cc
浏览文件 @
046405e0
...
@@ -32,9 +32,8 @@ class GaussianRandomBatchSizeLikeOp : public BatchSizeLikeOp {
...
@@ -32,9 +32,8 @@ class GaussianRandomBatchSizeLikeOp : public BatchSizeLikeOp {
};
};
class
GaussianRandomBatchSizeLikeOpMaker
:
public
BatchSizeLikeOpMaker
{
class
GaussianRandomBatchSizeLikeOpMaker
:
public
BatchSizeLikeOpMaker
{
public:
protected:
GaussianRandomBatchSizeLikeOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Apply
()
override
{
:
BatchSizeLikeOpMaker
(
proto
,
op_checker
)
{
AddAttr
<
float
>
(
"mean"
,
AddAttr
<
float
>
(
"mean"
,
"(float, default 0.0) "
"(float, default 0.0) "
"mean of random tensor."
)
"mean of random tensor."
)
...
...
paddle/fluid/operators/gaussian_random_op.cc
浏览文件 @
046405e0
...
@@ -70,8 +70,7 @@ class GaussianRandomOp : public framework::OperatorWithKernel {
...
@@ -70,8 +70,7 @@ class GaussianRandomOp : public framework::OperatorWithKernel {
class
GaussianRandomOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
GaussianRandomOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
GaussianRandomOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
framework
::
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddOutput
(
"Out"
,
"Output matrix of gaussian random op"
);
AddOutput
(
"Out"
,
"Output matrix of gaussian random op"
);
AddAttr
<
std
::
vector
<
int
>>
(
"shape"
,
AddAttr
<
std
::
vector
<
int
>>
(
"shape"
,
...
...
paddle/fluid/operators/get_places_op.cc
浏览文件 @
046405e0
...
@@ -78,8 +78,7 @@ class GetPlacesOp : public framework::OperatorBase {
...
@@ -78,8 +78,7 @@ class GetPlacesOp : public framework::OperatorBase {
class
GetPlacesOpProtoMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
GetPlacesOpProtoMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
GetPlacesOpProtoMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddOutput
(
"Out"
,
"vector of Place"
);
AddOutput
(
"Out"
,
"vector of Place"
);
AddAttr
<
int
>
(
"device_count"
,
"device count"
).
SetDefault
(
0
);
AddAttr
<
int
>
(
"device_count"
,
"device count"
).
SetDefault
(
0
);
AddAttr
<
std
::
string
>
(
"device_type"
,
"device type"
)
AddAttr
<
std
::
string
>
(
"device_type"
,
"device type"
)
...
...
paddle/fluid/operators/go_op.cc
浏览文件 @
046405e0
...
@@ -89,8 +89,7 @@ class GoOp : public framework::OperatorBase {
...
@@ -89,8 +89,7 @@ class GoOp : public framework::OperatorBase {
class
GoOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
GoOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
GoOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
kX
,
AddInput
(
kX
,
"A set of variables, which are required by operators inside the "
"A set of variables, which are required by operators inside the "
"block of Go Op."
)
"block of Go Op."
)
...
...
paddle/fluid/operators/gru_op.cc
浏览文件 @
046405e0
...
@@ -71,8 +71,7 @@ class GRUOp : public framework::OperatorWithKernel {
...
@@ -71,8 +71,7 @@ class GRUOp : public framework::OperatorWithKernel {
class
GRUOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
GRUOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
GRUOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"Input"
,
AddInput
(
"Input"
,
"(LoDTensor) The first input is a LodTensor, which supports "
"(LoDTensor) The first input is a LodTensor, which supports "
"variable-time length input sequence. The underlying tensor in "
"variable-time length input sequence. The underlying tensor in "
...
...
paddle/fluid/operators/gru_unit_op.cc
浏览文件 @
046405e0
...
@@ -71,8 +71,7 @@ class GRUUnitOp : public framework::OperatorWithKernel {
...
@@ -71,8 +71,7 @@ class GRUUnitOp : public framework::OperatorWithKernel {
class
GRUUnitOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
GRUUnitOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
GRUUnitOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"Input"
,
AddInput
(
"Input"
,
"(Tensor) Matrix with shape [batch_size, frame_size * 3] for the "
"(Tensor) Matrix with shape [batch_size, frame_size * 3] for the "
"input."
);
"input."
);
...
...
paddle/fluid/operators/hinge_loss_op.cc
浏览文件 @
046405e0
...
@@ -46,8 +46,7 @@ class HingeLossOp : public framework::OperatorWithKernel {
...
@@ -46,8 +46,7 @@ class HingeLossOp : public framework::OperatorWithKernel {
template
<
typename
AttrType
>
template
<
typename
AttrType
>
class
HingeLossOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
HingeLossOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
HingeLossOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"Logits"
,
AddInput
(
"Logits"
,
"The input value (Logits) of Hinge loss op."
"The input value (Logits) of Hinge loss op."
"Logits is a 2-D tensor with shape [batch_size, 1]."
);
"Logits is a 2-D tensor with shape [batch_size, 1]."
);
...
...
paddle/fluid/operators/huber_loss_op.cc
浏览文件 @
046405e0
...
@@ -45,8 +45,7 @@ class HuberLossOp : public framework::OperatorWithKernel {
...
@@ -45,8 +45,7 @@ class HuberLossOp : public framework::OperatorWithKernel {
template
<
typename
AttrType
>
template
<
typename
AttrType
>
class
HuberLossOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
HuberLossOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
HuberLossOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
AddInput
(
"X"
,
"The input value of huber loss op."
"The input value of huber loss op."
"X is a 2-D tensor with shape [batch_size, 1]."
);
"X is a 2-D tensor with shape [batch_size, 1]."
);
...
...
paddle/fluid/operators/im2sequence_op.cc
浏览文件 @
046405e0
...
@@ -54,8 +54,7 @@ class Im2SequenceOp : public framework::OperatorWithKernel {
...
@@ -54,8 +54,7 @@ class Im2SequenceOp : public framework::OperatorWithKernel {
class
Im2SequenceOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
Im2SequenceOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
Im2SequenceOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
AddInput
(
"X"
,
"(Tensor) The input tensor has NCHW format."
"(Tensor) The input tensor has NCHW format."
"N: batch size"
"N: batch size"
...
...
paddle/fluid/operators/increment_op.cc
浏览文件 @
046405e0
...
@@ -47,8 +47,7 @@ class IncrementOp : public framework::OperatorWithKernel {
...
@@ -47,8 +47,7 @@ class IncrementOp : public framework::OperatorWithKernel {
class
IncrementOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
IncrementOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
IncrementOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
"(Tensor) The input tensor of increment operator"
);
AddInput
(
"X"
,
"(Tensor) The input tensor of increment operator"
);
AddOutput
(
"Out"
,
"(Tensor) The output tensor of increment operator."
);
AddOutput
(
"Out"
,
"(Tensor) The output tensor of increment operator."
);
AddAttr
<
float
>
(
"step"
,
AddAttr
<
float
>
(
"step"
,
...
...
paddle/fluid/operators/iou_similarity_op.cc
浏览文件 @
046405e0
...
@@ -42,8 +42,7 @@ class IOUSimilarityOp : public framework::OperatorWithKernel {
...
@@ -42,8 +42,7 @@ class IOUSimilarityOp : public framework::OperatorWithKernel {
class
IOUSimilarityOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
IOUSimilarityOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
IOUSimilarityOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
AddInput
(
"X"
,
"(LoDTensor, default LoDTensor<float>) "
"(LoDTensor, default LoDTensor<float>) "
"Box list X is a 2-D LoDTensor with shape [N, 4] holds N boxes, "
"Box list X is a 2-D LoDTensor with shape [N, 4] holds N boxes, "
...
...
paddle/fluid/operators/is_empty_op.cc
浏览文件 @
046405e0
...
@@ -48,8 +48,7 @@ class IsEmptyOp : public framework::OperatorBase {
...
@@ -48,8 +48,7 @@ class IsEmptyOp : public framework::OperatorBase {
class
IsEmptyOpProtoMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
IsEmptyOpProtoMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
IsEmptyOpProtoMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
kInput
,
"(Tensor) Tensor which is to be checked."
);
AddInput
(
kInput
,
"(Tensor) Tensor which is to be checked."
);
AddOutput
(
kOutput
,
"(Tensor) a boolean Tensor that indicate empty or not."
);
AddOutput
(
kOutput
,
"(Tensor) a boolean Tensor that indicate empty or not."
);
AddComment
(
R"DOC(
AddComment
(
R"DOC(
...
...
paddle/fluid/operators/l1_norm_op.cc
浏览文件 @
046405e0
...
@@ -48,8 +48,7 @@ class L1NormGradOp : public framework::OperatorWithKernel {
...
@@ -48,8 +48,7 @@ class L1NormGradOp : public framework::OperatorWithKernel {
class
L1NormOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
L1NormOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
L1NormOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
framework
::
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
"(Tensor) The input of l1_norm op."
);
AddInput
(
"X"
,
"(Tensor) The input of l1_norm op."
);
AddOutput
(
"Out"
,
"(Scalar) The output of l1_norm op."
);
AddOutput
(
"Out"
,
"(Scalar) The output of l1_norm op."
);
AddComment
(
R"DOC(
AddComment
(
R"DOC(
...
...
paddle/fluid/operators/label_smooth_op.cc
浏览文件 @
046405e0
...
@@ -47,8 +47,7 @@ class LabelSmoothOp : public framework::OperatorWithKernel {
...
@@ -47,8 +47,7 @@ class LabelSmoothOp : public framework::OperatorWithKernel {
class
LabelSmoothOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
LabelSmoothOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
LabelSmoothOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
AddInput
(
"X"
,
"(LoDTensor) The input labels of LabelSmooth operator. This "
"(LoDTensor) The input labels of LabelSmooth operator. This "
"input can be batched labels in one-hot encoding or output from "
"input can be batched labels in one-hot encoding or output from "
...
...
paddle/fluid/operators/layer_norm_op.cc
浏览文件 @
046405e0
...
@@ -61,8 +61,7 @@ class LayerNormOp : public framework::OperatorWithKernel {
...
@@ -61,8 +61,7 @@ class LayerNormOp : public framework::OperatorWithKernel {
class
LayerNormOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
LayerNormOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
LayerNormOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
"(LoDTensor) The input tensor."
);
AddInput
(
"X"
,
"(LoDTensor) The input tensor."
);
AddInput
(
"Scale"
,
AddInput
(
"Scale"
,
"(Tensor, optional) Scale is a 1-dimensional tensor of size "
"(Tensor, optional) Scale is a 1-dimensional tensor of size "
...
...
paddle/fluid/operators/linear_chain_crf_op.cc
浏览文件 @
046405e0
...
@@ -19,8 +19,7 @@ namespace operators {
...
@@ -19,8 +19,7 @@ namespace operators {
class
LinearChainCRFOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
LinearChainCRFOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
LinearChainCRFOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"Emission"
,
AddInput
(
"Emission"
,
"(LoDTensor, default LoDTensor<float>) "
"(LoDTensor, default LoDTensor<float>) "
"A 2-D LoDTensor with shape [N x D], where N is the size of the "
"A 2-D LoDTensor with shape [N x D], where N is the size of the "
...
...
paddle/fluid/operators/listen_and_serv_op.cc
浏览文件 @
046405e0
...
@@ -343,8 +343,7 @@ void ListenAndServOp::RunImpl(const framework::Scope &scope,
...
@@ -343,8 +343,7 @@ void ListenAndServOp::RunImpl(const framework::Scope &scope,
class
ListenAndServOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
ListenAndServOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
ListenAndServOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
"(Tensor) Variables that server recv."
).
AsDuplicable
();
AddInput
(
"X"
,
"(Tensor) Variables that server recv."
).
AsDuplicable
();
AddComment
(
R"DOC(
AddComment
(
R"DOC(
ListenAndServ operator
ListenAndServ operator
...
...
paddle/fluid/operators/load_combine_op.cc
浏览文件 @
046405e0
...
@@ -77,8 +77,7 @@ class LoadCombineOp : public framework::OperatorBase {
...
@@ -77,8 +77,7 @@ class LoadCombineOp : public framework::OperatorBase {
class
LoadCombineOpProtoMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
LoadCombineOpProtoMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
LoadCombineOpProtoMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddOutput
(
AddOutput
(
"Out"
,
"Out"
,
"(vector) The output LoDTensors that will be read from the input file."
)
"(vector) The output LoDTensors that will be read from the input file."
)
...
...
paddle/fluid/operators/load_op.cc
浏览文件 @
046405e0
...
@@ -73,8 +73,7 @@ class LoadOp : public framework::OperatorBase {
...
@@ -73,8 +73,7 @@ class LoadOp : public framework::OperatorBase {
class
LoadOpProtoMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
LoadOpProtoMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
LoadOpProtoMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddOutput
(
"Out"
,
"(Tensor) The tensor need to be loaded"
);
AddOutput
(
"Out"
,
"(Tensor) The tensor need to be loaded"
);
AddAttr
<
bool
>
(
AddAttr
<
bool
>
(
"load_as_fp16"
,
"load_as_fp16"
,
...
...
paddle/fluid/operators/lod_array_length_op.cc
浏览文件 @
046405e0
...
@@ -40,8 +40,7 @@ class LoDArrayLengthOp : public framework::OperatorBase {
...
@@ -40,8 +40,7 @@ class LoDArrayLengthOp : public framework::OperatorBase {
class
LoDArrayLengthProtoMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
LoDArrayLengthProtoMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
LoDArrayLengthProtoMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
"(LoDTensorArray) The input tensor array."
);
AddInput
(
"X"
,
"(LoDTensorArray) The input tensor array."
);
AddOutput
(
"Out"
,
"(Tensor) 1x1 CPU Tensor of length, int64_t"
);
AddOutput
(
"Out"
,
"(Tensor) 1x1 CPU Tensor of length, int64_t"
);
AddComment
(
R"DOC(
AddComment
(
R"DOC(
...
...
paddle/fluid/operators/lod_rank_table_op.cc
浏览文件 @
046405e0
...
@@ -38,8 +38,7 @@ class LoDRankTableOp : public framework::OperatorBase {
...
@@ -38,8 +38,7 @@ class LoDRankTableOp : public framework::OperatorBase {
class
LoDRankTableOpProtoMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
LoDRankTableOpProtoMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
LoDRankTableOpProtoMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
AddInput
(
"X"
,
"(LoDTensor) input lod tensor, must contain lod information."
);
"(LoDTensor) input lod tensor, must contain lod information."
);
AddOutput
(
"Out"
,
"(LoDRankTable) The rank table of specific level."
);
AddOutput
(
"Out"
,
"(LoDRankTable) The rank table of specific level."
);
...
...
paddle/fluid/operators/lod_reset_op.cc
浏览文件 @
046405e0
...
@@ -47,8 +47,7 @@ class LoDResetOp : public framework::OperatorWithKernel {
...
@@ -47,8 +47,7 @@ class LoDResetOp : public framework::OperatorWithKernel {
class
LoDResetOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
LoDResetOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
LoDResetOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
AddInput
(
"X"
,
"(Tensor, LoDTensor) Input variable of LoDResetOp which "
"(Tensor, LoDTensor) Input variable of LoDResetOp which "
"could be a Tensor or LoDTensor, where the data of output "
"could be a Tensor or LoDTensor, where the data of output "
...
...
paddle/fluid/operators/lod_tensor_to_array_op.cc
浏览文件 @
046405e0
...
@@ -105,8 +105,7 @@ class LoDTensorToArrayOp : public framework::OperatorBase {
...
@@ -105,8 +105,7 @@ class LoDTensorToArrayOp : public framework::OperatorBase {
class
LoDTensorToArrayOpProtoMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
LoDTensorToArrayOpProtoMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
LoDTensorToArrayOpProtoMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
""
);
AddInput
(
"X"
,
""
);
AddInput
(
"RankTable"
,
""
);
AddInput
(
"RankTable"
,
""
);
AddOutput
(
"Out"
,
""
);
AddOutput
(
"Out"
,
""
);
...
...
paddle/fluid/operators/log_loss_op.cc
浏览文件 @
046405e0
...
@@ -46,8 +46,7 @@ class LogLossOp : public framework::OperatorWithKernel {
...
@@ -46,8 +46,7 @@ class LogLossOp : public framework::OperatorWithKernel {
template
<
typename
AttrType
>
template
<
typename
AttrType
>
class
LogLossOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
LogLossOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
LogLossOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"Predicted"
,
AddInput
(
"Predicted"
,
"The input value (Predicted) of Log loss op."
"The input value (Predicted) of Log loss op."
"Predicted is a 2-D tensor with shape [batch_size, 1]."
);
"Predicted is a 2-D tensor with shape [batch_size, 1]."
);
...
...
paddle/fluid/operators/logical_op.cc
浏览文件 @
046405e0
...
@@ -21,8 +21,7 @@ namespace operators {
...
@@ -21,8 +21,7 @@ namespace operators {
template
<
typename
OpComment
>
template
<
typename
OpComment
>
class
BinaryLogicalOpProtoMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
BinaryLogicalOpProtoMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
BinaryLogicalOpProtoMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
OpComment
comment
;
OpComment
comment
;
AddInput
(
"X"
,
AddInput
(
"X"
,
string
::
Sprintf
(
"(LoDTensor) Left hand operand of %s operator"
,
string
::
Sprintf
(
"(LoDTensor) Left hand operand of %s operator"
,
...
@@ -45,8 +44,7 @@ Each element of Out is calculated by %s
...
@@ -45,8 +44,7 @@ Each element of Out is calculated by %s
template
<
typename
OpComment
>
template
<
typename
OpComment
>
class
UnaryLogicalOpProtoMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
UnaryLogicalOpProtoMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
UnaryLogicalOpProtoMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
OpComment
comment
;
OpComment
comment
;
AddInput
(
"X"
,
string
::
Sprintf
(
"(LoDTensor) Operand of %s operator"
,
AddInput
(
"X"
,
string
::
Sprintf
(
"(LoDTensor) Operand of %s operator"
,
comment
.
type
));
comment
.
type
));
...
...
paddle/fluid/operators/lookup_sparse_table_op.cc
浏览文件 @
046405e0
...
@@ -105,8 +105,7 @@ class LookupSparseTableOp : public framework::OperatorBase {
...
@@ -105,8 +105,7 @@ class LookupSparseTableOp : public framework::OperatorBase {
class
LookupSparseTableOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
LookupSparseTableOpMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
public:
LookupSparseTableOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
void
Make
()
override
{
:
framework
::
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"W"
,
AddInput
(
"W"
,
"(SelectedRows) The input represents embedding table, "
"(SelectedRows) The input represents embedding table, "
"which is a learnable parameter."
);
"which is a learnable parameter."
);
...
...
paddle/fluid/operators/lookup_table_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/lrn_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/lstm_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/lstm_unit_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/lstmp_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/margin_rank_loss_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/matmul_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/max_sequence_len_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/maxout_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/mean_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/merge_lod_tensor_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/mine_hard_examples_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/minus_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/modified_huber_loss_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/momentum_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/mul_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/multiclass_nms_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/multiplex_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/nccl_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/nce_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/norm_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/one_hot_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/pad_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/parallel_do_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/pool_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/pool_op.h
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/pool_with_index_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/positive_negative_pair_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/precision_recall_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/prefetch_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/prelu_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/print_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/prior_box_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/proximal_adagrad_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/proximal_gd_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/rank_loss_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/read_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/reader/create_batch_reader_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/reader/create_double_buffer_reader_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/reader/create_multi_pass_reader_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/reader/create_random_data_generator_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/reader/create_recordio_file_reader_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/reader/create_shuffle_reader_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/reader/create_threaded_reader_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/reader/open_files_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/reader/reader_op_registry.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/reader/reader_op_registry.h
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/recurrent_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/recv_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/reduce_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/reorder_lod_tensor_by_rank_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/reshape_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/rmsprop_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/rnn_memory_helper_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/roi_pool_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/row_conv_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/save_combine_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/save_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/scale_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/scatter_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/select_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/send_barrier_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/send_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/send_vars_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/sequence_concat_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/sequence_conv_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/sequence_erase_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/sequence_expand_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/sequence_pool_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/sequence_reshape_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/sequence_slice_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/sequence_softmax_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/sgd_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/shrink_rnn_memory_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/sigmoid_cross_entropy_with_logits_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/sign_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/smooth_l1_loss_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/softmax_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/softmax_with_cross_entropy_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/split_byref_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/split_ids_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/split_lod_tensor_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/split_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/split_selected_rows_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/spp_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/squared_l2_distance_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/squared_l2_norm_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/sum_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/target_assign_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/tensor_array_read_write_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/top_k_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/transpose_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/uniform_random_batch_size_like_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/uniform_random_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/unpool_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/warpctc_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
paddle/fluid/operators/while_op.cc
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
python/paddle/fluid/layers/layer_function_generator.py
浏览文件 @
046405e0
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录