From 1badb4c6a4fd374b1d13357e5501459cbf1e6845 Mon Sep 17 00:00:00 2001 From: Chen Weihang Date: Wed, 24 Aug 2022 05:00:59 -0500 Subject: [PATCH] remove needless comments (#45376) --- paddle/phi/api/yaml/legacy_api.yaml | 89 +----------------------- paddle/phi/api/yaml/legacy_backward.yaml | 5 -- 2 files changed, 1 insertion(+), 93 deletions(-) diff --git a/paddle/phi/api/yaml/legacy_api.yaml b/paddle/phi/api/yaml/legacy_api.yaml index d4b7c6dcff..98d75b7f2d 100755 --- a/paddle/phi/api/yaml/legacy_api.yaml +++ b/paddle/phi/api/yaml/legacy_api.yaml @@ -10,7 +10,6 @@ func : abs backward : abs_grad -# accuracy - api : accuracy args : (Tensor x, Tensor indices, Tensor label) output : Tensor(accuracy), Tensor(correct), Tensor(total) @@ -20,7 +19,6 @@ func : accuracy dtype : x -# acos - api : acos args : (Tensor x) output : Tensor @@ -30,7 +28,6 @@ func : acos backward : acos_grad -# acosh - api : acosh args : (Tensor x) output : Tensor @@ -199,7 +196,6 @@ data_transform : support_trans_dtype : start, end, step -# arg_max - api : argmax args : (Tensor x, int64_t axis, bool keepdims, bool flatten, int dtype) output : Tensor(out) @@ -208,7 +204,6 @@ kernel : func : arg_max -# arg_min - api : argmin args : (Tensor x, int64_t axis, bool keepdims, bool flatten, int dtype) output : Tensor(out) @@ -243,7 +238,7 @@ kernel : func : as_real backward : as_real_grad -# asin + - api : asin args : (Tensor x) output : Tensor @@ -253,7 +248,6 @@ func : asin backward : asin_grad -# asinh - api : asinh args : (Tensor x) output : Tensor @@ -263,7 +257,6 @@ func : asinh backward : asinh_grad -# assign - api : assign args : (Tensor x) output : Tensor @@ -285,7 +278,6 @@ inplace : (output -> out) backward : assign_out__grad -# assgin_value - api : assign_value_ args : (Tensor output, int[] shape, DataType dtype, Scalar[] values, Place place = {}) output : Tensor(out) @@ -299,7 +291,6 @@ data_type : dtype backend : place > output -# atan - api : atan args : (Tensor x) output : Tensor @@ -309,7 +300,6 @@ func : atan backward : atan_grad -# atanh - api : atanh args : (Tensor x) output : Tensor @@ -319,7 +309,6 @@ func : atanh backward : atanh_grad -# auc - api : auc args : (Tensor x, Tensor label, Tensor stat_pos, Tensor stat_neg, Tensor ins_tag_weight, str curve, int num_thresholds, int slide_steps) output : Tensor(auc), Tensor(stat_pos_out), Tensor(stat_neg_out) @@ -329,7 +318,6 @@ func : auc optional : ins_tag_weight -#average_accumulates - api : average_accumulates_ args : (Tensor param, Tensor in_sum_1, Tensor in_sum_2, Tensor in_sum_3, Tensor in_num_accumulates, Tensor in_old_num_accumulates, Tensor in_num_updates, float average_window, int64_t max_average_window, int64_t min_average_window) output : Tensor(out_sum_1), Tensor(out_sum_2), Tensor(out_sum_3), Tensor(out_num_accumulates), Tensor(out_old_num_accumulates), Tensor(out_num_updates) @@ -340,7 +328,6 @@ data_type : param inplace : (in_sum_1 -> out_sum_1), (in_sum_2 -> out_sum_2), (in_sum_3 -> out_sum_3), (in_num_accumulates -> out_num_accumulates), (in_old_num_accumulates -> out_old_num_accumulates), (in_num_updates -> out_num_updates) -# batch_norm - api : batch_norm args : (Tensor x, Tensor scale, Tensor bias, Tensor mean, Tensor variance, float momentum, float epsilon, str data_layout, bool is_test, bool use_global_stats, bool trainable_statistics, bool fuse_with_relu) output : Tensor(out), Tensor(mean_out), Tensor(variance_out), Tensor(saved_mean), Tensor(saved_variance), Tensor(reserve_space) @@ -388,7 +375,6 @@ optional : bias backward : bilinear_tensor_product_grad -# bitwise_and - api : bitwise_and args : (Tensor x, Tensor y) output : Tensor(out) @@ -397,7 +383,6 @@ kernel : func : bitwise_and -# bitwise_not - api : bitwise_not args : (Tensor x) output : Tensor(out) @@ -406,7 +391,6 @@ kernel : func : bitwise_not -# bitwise_or - api : bitwise_or args : (Tensor x, Tensor y) output : Tensor(out) @@ -415,7 +399,6 @@ kernel : func : bitwise_or -# bitwise_xor - api : bitwise_xor args : (Tensor x, Tensor y) output : Tensor(out) @@ -424,7 +407,6 @@ kernel : func : bitwise_xor -# bmm - api : bmm args : (Tensor x, Tensor y) output : Tensor @@ -434,7 +416,6 @@ func : bmm backward : bmm_grad -# box_coder - api : box_coder args : (Tensor prior_box, Tensor prior_box_var, Tensor target_box, str code_type, bool box_normalized, int axis, float[] variance) output : Tensor(output_box) @@ -444,7 +425,6 @@ func : box_coder optional : prior_box_var -# brelu - api : brelu args : (Tensor x, float t_min, float t_max) output : Tensor @@ -586,7 +566,6 @@ output : Tensor(out) invoke : copy_to_impl(x, place, blocking) -# cos - api : cos args : (Tensor x) output : Tensor @@ -596,7 +575,6 @@ func : cos backward : cos_grad -# cosh - api : cosh args : (Tensor x) output : Tensor @@ -646,7 +624,6 @@ func : cumsum backward : cumsum_grad -# decode_jpeg - api : decode_jpeg args : (Tensor x, str mode) output : Tensor(out) @@ -744,7 +721,6 @@ data_type: DataType::FLOAT32 optional : hypslength, refslength -# eigh - api : eigh args : (Tensor x, str uplo) output : Tensor(out_w), Tensor(out_v) @@ -790,7 +766,6 @@ func : elementwise_pow backward : elementwise_pow_grad -# elu - api : elu args : (Tensor x, float alpha) output : Tensor(out) @@ -848,7 +823,6 @@ kernel : func : equal_all -# exp - api : exp args : (Tensor x) output : Tensor(out) @@ -859,7 +833,6 @@ inplace : (x -> out) backward : exp_grad -# expand - api : expand args : (Tensor x, IntArray shape) output : Tensor @@ -869,7 +842,6 @@ func : expand backward : expand_grad -# expand_as - api : expand_as args : (Tensor x, Tensor y, int[] target_shape) output : Tensor @@ -957,7 +929,6 @@ intermediate : xshape backward : flatten_grad -# flip - api : flip args : (Tensor x, int[] axis) output : Tensor @@ -1035,7 +1006,6 @@ data_type : dtype backend : place -# full - api : full_ args : (Tensor output, IntArray shape, Scalar value, DataType dtype=DataType::FLOAT32, Place place=CPUPlace()) output : Tensor(out) @@ -1171,7 +1141,6 @@ kernel : func : greater_than -# grid sample - api : grid_sample args : (Tensor x, Tensor grid, str mode, str padding_mode, bool align_corners) output : Tensor(out) @@ -1203,7 +1172,6 @@ func : gumbel_softmax backward : gumbel_softmax_grad -# hard_shrink - api : hard_shrink args : (Tensor x, float threshold) output : Tensor @@ -1214,7 +1182,6 @@ func : hard_shrink backward : hard_shrink_grad -# hard_sigmoid - api : hard_sigmoid args : (Tensor x, float slope, float offset) output : Tensor @@ -1235,7 +1202,6 @@ func : hard_swish backward : hard_swish_grad -# hierarchical_sigmoid - api : hierarchical_sigmoid args : (Tensor x, Tensor w, Tensor label, Tensor path, Tensor code, Tensor bias, int num_classes, bool remote_prefetch, int trainer_id, int64_t[] height_sections, str[] epmap, str[] table_names, bool is_sparse) output : Tensor(out), Tensor(pre_out), Tensor(w_out) @@ -1247,7 +1213,6 @@ data_type : x backward : hierarchical_sigmoid_grad -# histogram - api : histogram args : (Tensor x, int64_t bins, int min, int max) output : Tensor(out) @@ -1274,7 +1239,6 @@ func : imag backward : imag_grad -# increment - api : increment args : (Tensor x, float value) output : Tensor(out) @@ -1324,7 +1288,6 @@ func : inverse backward : inverse_grad -# is_empty - api : is_empty args : (Tensor x) output : Tensor(out) @@ -1342,7 +1305,6 @@ kernel : func : isclose -# isfinite - api : isfinite args : (Tensor x) output : Tensor(out) @@ -1352,7 +1314,6 @@ func : isfinite {dense -> dense}, infinite_sr {selected_rows -> selected_rows} -# isinf - api : isinf args : (Tensor x) output : Tensor(out) @@ -1362,7 +1323,6 @@ func : isinf {dense -> dense}, isinf_sr {selected_rows -> selected_rows} -# isnan - api : isnan args : (Tensor x) output : Tensor(out) @@ -1400,7 +1360,6 @@ func : kthvalue backward : kthvalue_grad -# label_smooth - api : label_smooth args : (Tensor label, Tensor prior_dist, float epsilon) output : Tensor @@ -1436,7 +1395,6 @@ backward : layer_norm_grad optional : scale, bias -# leaky_relu - api : leaky_relu args : (Tensor x, float alpha) output : Tensor @@ -1529,7 +1487,6 @@ func : log2 backward: log2_grad -# log_loss - api : log_loss args : (Tensor input, Tensor label, float epsilon) output : Tensor @@ -1557,7 +1514,6 @@ func : logcumsumexp backward : logcumsumexp_grad -# logical_and - api : logical_and args : (Tensor x, Tensor y) output : Tensor(out) @@ -1566,7 +1522,6 @@ kernel : func : logical_and -# logical_not - api : logical_not args : (Tensor x) output : Tensor(out) @@ -1575,7 +1530,6 @@ kernel : func : logical_not -# logical_or - api : logical_or args : (Tensor x, Tensor y) output : Tensor(out) @@ -1584,7 +1538,6 @@ kernel : func : logical_or -# logical_xor - api : logical_xor args : (Tensor x, Tensor y) output : Tensor(out) @@ -1593,7 +1546,6 @@ kernel : func : logical_xor -# logit - api : logit args : (Tensor x, float eps = 1e-6f) output : Tensor @@ -1604,7 +1556,6 @@ func : logit backward : logit_grad -# logsigmoid - api : logsigmoid args : (Tensor x) output : Tensor @@ -1661,7 +1612,6 @@ data_type : logits backward : margin_cross_entropy_grad -# masked_select - api : masked_select args : (Tensor x, Tensor mask) output : Tensor @@ -1689,7 +1639,6 @@ kernel : func : matrix_nms -# matrix_power - api : matrix_power args : (Tensor x, int n) output : Tensor @@ -1875,7 +1824,6 @@ func : multiclass_nms3 optional : rois_num -# multinomial - api : multinomial args : (Tensor x, int num_samples, bool replacement) output : Tensor(out) @@ -1979,7 +1927,6 @@ func : p_norm backward : p_norm_grad -# pad - api : pad args : (Tensor x, int[] paddings, float pad_value) output : Tensor @@ -1998,7 +1945,6 @@ func : pad3d backward : pad3d_grad -# pixel_shuffle - api : pixel_shuffle args : (Tensor x, int upscale_factor, str data_format) output : Tensor @@ -2077,7 +2023,6 @@ optional : boxes_num backward : psroi_pool_grad -# put_along_axis - api : put_along_axis args : (Tensor x, Tensor index, Tensor value, int axis, str reduce) output : Tensor(out) @@ -2142,7 +2087,6 @@ inplace : (x -> out) backward : reciprocal_grad -# reduce_prod - api : reduce_prod args : (Tensor x, int64_t[] dims, bool keep_dim, bool reduce_all) output : Tensor @@ -2338,7 +2282,6 @@ func : searchsorted data_type : sorted_sequence -# segment_pool - api : segment_pool args : (Tensor x, Tensor segment_ids, str pooltype) output : Tensor(out), Tensor(summed_ids) @@ -2349,7 +2292,6 @@ data_type : x backward : segment_pool_grad -# selu - api : selu args : (Tensor x, float scale, float alpha) output : Tensor @@ -2386,7 +2328,6 @@ data_transform: skip_transform : input -# shard_index - api : shard_index args : (Tensor in, int index_num, int nshards, int shard_id, int ignore_value) output : Tensor(out) @@ -2395,7 +2336,6 @@ kernel : func : shard_index -# sigmoid - api : sigmoid args : (Tensor x) output : Tensor @@ -2405,7 +2345,6 @@ func : sigmoid backward : sigmoid_grad -# sigmoid_cross_entropy_with_logits - api : sigmoid_cross_entropy_with_logits args : (Tensor x, Tensor label, bool normalize, int ignore_index) output : Tensor @@ -2423,7 +2362,6 @@ kernel : func : sign -# silu - api : silu args : (Tensor x) output : Tensor @@ -2433,7 +2371,6 @@ func : silu backward : silu_grad -# sin - api : sin args : (Tensor x) output : Tensor @@ -2443,7 +2380,6 @@ func : sin backward : sin_grad -# sinh - api : sinh args : (Tensor x) output : Tensor @@ -2453,7 +2389,6 @@ func : sinh backward : sinh_grad -# size - api : size args : (Tensor x) output : Tensor(size) @@ -2482,7 +2417,6 @@ func : slogdeterminant backward : slogdet_grad -# soft_shrink - api : soft_shrink args : (Tensor x, float lambda) output : Tensor @@ -2514,7 +2448,6 @@ func : softplus backward : softplus_grad -# softsign - api : softsign args : (Tensor x) output : Tensor @@ -2639,7 +2572,6 @@ func : swish backward : swish_grad -# sync_batch_norm - api : sync_batch_norm_ args : (Tensor x, Tensor scale, Tensor bias, Tensor mean, Tensor variance, float momentum, float epsilon, str data_layout, bool is_test, bool use_global_stats, bool trainable_statistics, bool fuse_with_relu) output : Tensor(out), Tensor(mean_out), Tensor(variance_out), Tensor(saved_mean), Tensor(saved_variance), Tensor(reserve_space) @@ -2651,7 +2583,6 @@ backward : sync_batch_norm_grad inplace : (mean -> mean_out), (variance -> variance_out) -# take_along_axis - api : take_along_axis args : (Tensor x, Tensor index, int axis) output : Tensor @@ -2663,7 +2594,6 @@ data_type : x backward : take_along_axis_grad -# tan - api : tan args : (Tensor x) output : Tensor @@ -2673,7 +2603,6 @@ func : tan backward : tan_grad -# tanh - api : tanh args : (Tensor x) output : Tensor(out) @@ -2684,7 +2613,6 @@ inplace : (x -> out) backward : tanh_grad -# tanh_shrink - api : tanh_shrink args : (Tensor x) output : Tensor @@ -2694,7 +2622,6 @@ func : tanh_shrink backward : tanh_shrink_grad -# temporal_shift - api : temporal_shift args : (Tensor x, int seg_num, float shift_ratio, str data_format_str) output : Tensor @@ -2704,7 +2631,6 @@ func : temporal_shift backward : temporal_shift_grad -# thresholded_relu - api : thresholded_relu args : (Tensor x, float threshold) output : Tensor @@ -2715,7 +2641,6 @@ func : thresholded_relu backward : thresholded_relu_grad -# tile - api : tile args : (Tensor x, IntArray repeat_times) output : Tensor @@ -2806,7 +2731,6 @@ func : unbind backward : unbind_grad -# unfold - api : unfold args : (Tensor x, int[] kernel_sizes, int[] strides, int[] paddings, int[] dilations) output : Tensor @@ -2859,7 +2783,6 @@ intermediate : xshape backward : unsqueeze_grad -# unstack - api : unstack args : (Tensor x, int axis, int num) output : Tensor[]{num} @@ -2869,7 +2792,6 @@ func : unstack backward : unstack_grad -# viterbi_decode - api : viterbi_decode args : (Tensor input, Tensor transition, Tensor length, bool include_bos_eos_tag) output : Tensor(scores), Tensor(path) @@ -2900,7 +2822,6 @@ func : where backward : where_grad -# where_index - api : where_index args : (Tensor condition) output : Tensor(out) @@ -2909,7 +2830,6 @@ kernel : func : where_index -# yolo_box - api : yolo_box args : (Tensor x, Tensor img_size, int[] anchors, int class_num, float conf_thresh, int downsample_ratio, bool clip_bbox, float scale_x_y=1.0, bool iou_aware=false, float iou_aware_factor=0.5) output : Tensor(boxes), Tensor(scores) @@ -2919,7 +2839,6 @@ func : yolo_box data_type : x -# yolov3_loss - api : yolov3_loss args : (Tensor x, Tensor gt_box, Tensor gt_label, Tensor gt_score, int[] anchors, int[] anchor_mask, int class_num, float ignore_thresh, int downsample_ratio, bool use_label_smooth=true, float scale_x_y=1.0) output : Tensor(loss), Tensor(objectness_mask), Tensor(gt_match_mask) @@ -2950,7 +2869,6 @@ func: broadcast_tensors backward: broadcast_tensors_grad -# dirichlet - api: dirichlet args: (Tensor alpha) output: Tensor(out) @@ -2959,7 +2877,6 @@ kernel: func: dirichlet -# eig - api: eig args: (Tensor x) output: Tensor(out_w), Tensor(out_v) @@ -2969,7 +2886,6 @@ func: eig backward: eig_grad -# fold - api: fold args: (Tensor x, int[] output_sizes, int[] kernel_sizes, int[] strides, int[] paddings, int[] dilations) output: Tensor(out) @@ -2979,7 +2895,6 @@ func: fold backward: fold_grad -# overlap_add - api: overlap_add args: (Tensor x, int hop_length, int axis) output: Tensor @@ -3000,7 +2915,6 @@ inplace: (x -> out) backward: uniform_random_inplace_grad -# unpool - api: unpool args: (Tensor x, Tensor indices, int[] ksize, int[] strides, int[] padding, int[] output_size, str data_format) output: Tensor(out) @@ -3011,7 +2925,6 @@ data_type: x backward: unpool_grad -# unpool3d - api: unpool3d args: (Tensor x, Tensor indices, int[] ksize, int[] strides, int[] padding, int[] output_size, str data_format) output: Tensor(out) diff --git a/paddle/phi/api/yaml/legacy_backward.yaml b/paddle/phi/api/yaml/legacy_backward.yaml index d731b8c449..0232c03e2c 100755 --- a/paddle/phi/api/yaml/legacy_backward.yaml +++ b/paddle/phi/api/yaml/legacy_backward.yaml @@ -998,7 +998,6 @@ data_type : out_grad optional: out, dst_count -# grid sample - backward_api : grid_sample_grad forward : grid_sample (Tensor x, Tensor grid, str mode, str padding_mode, bool align_corners) -> Tensor(out) args : (Tensor x, Tensor grid, Tensor out_grad, str mode, str padding_mode, bool align_corners) @@ -2250,7 +2249,6 @@ func : softmax_grad use_gpudnn : true -# softplus - backward_api : softplus_grad forward : softplus (Tensor x, float beta, float threshold) -> Tensor(out) args : (Tensor x, Tensor out_grad, float beta, float threshold) @@ -2729,7 +2727,6 @@ func : yolov3_loss_grad optional : gt_score -# fold - backward_api: fold_grad forward: fold (Tensor x, int[] output_sizes, int[] kernel_sizes, int[] strides, int[] paddings, int[] dilations) -> Tensor(out) args: (Tensor x, Tensor out_grad, int[] output_sizes, int[] kernel_sizes, int[] strides, int[] paddings, int[] dilations) @@ -2741,7 +2738,6 @@ func: fold_grad no_need_buffer : x -# unpool3d - backward_api: unpool3d_grad forward: unpool3d (Tensor x, Tensor indices, int[] ksize, int[] strides, int[] padding, int[] output_size, str data_format) -> Tensor(out) args: (Tensor x, Tensor indices, Tensor out, Tensor out_grad, int[] ksize, int[] strides, int[] padding, int[] output_size, str data_format) @@ -2754,7 +2750,6 @@ data_type: x no_need_buffer : x -# unpool - backward_api: unpool_grad forward: unpool (Tensor x, Tensor indices, int[] ksize, int[] strides, int[] padding, int[] output_size, str data_format) -> Tensor(out) args: (Tensor x, Tensor indices, Tensor out, Tensor out_grad, int[] ksize, int[] strides, int[] padding, int[] output_size, str data_format) -- GitLab