diff --git a/benchmark/fluid/README.md b/benchmark/fluid/README.md index 28cade4634bb62723bf5120169e202657f548234..0a18d9fbd93e509bbffb6220acd2f310b2c66ced 100644 --- a/benchmark/fluid/README.md +++ b/benchmark/fluid/README.md @@ -59,7 +59,7 @@ python -c 'from recordio_converter import *; prepare_mnist("data", 1)' ## Run Distributed Benchmark on Kubernetes Cluster You may need to build a Docker image before submitting a cluster job onto Kubernetes, or you will -have to start all those processes mannually on each node, which is not recommended. +have to start all those processes manually on each node, which is not recommended. To build the Docker image, you need to choose a paddle "whl" package to run with, you may either download it from diff --git a/paddle/.common_test_util.sh b/paddle/.common_test_util.sh index 8d024bc7d01a26624ee5eaef339f216cdadbe2e2..4681e49a0f53214b1e259c9e138d87756184b00e 100644 --- a/paddle/.common_test_util.sh +++ b/paddle/.common_test_util.sh @@ -26,7 +26,7 @@ chmod a+rw $PORT_FILE $PORT_LOCK_FILE 2>/dev/null # # There are two parameter of this method # param 1: the begin of port range -# param 2: the lenght of port range. +# param 2: the length of port range. # so, the port range is [param1, param1+param2) acquire_ports(){ ( diff --git a/paddle/fluid/API.spec b/paddle/fluid/API.spec index 648bdf08ff113317783a8ad175df8f5b4fb4a095..ae52c0c4e724e0500fef5ddfa92e9cccaa82420d 100644 --- a/paddle/fluid/API.spec +++ b/paddle/fluid/API.spec @@ -74,8 +74,8 @@ paddle.fluid.initializer.init_on_cpu (ArgSpec(args=[], varargs=None, keywords=No paddle.fluid.initializer.NumpyArrayInitializer.__init__ (ArgSpec(args=['self', 'value'], varargs=None, keywords=None, defaults=None), ('document', '6adf97f83acf6453d4a6a4b1070f3754')) paddle.fluid.layers.fc (ArgSpec(args=['input', 'size', 'num_flatten_dims', 'param_attr', 'bias_attr', 'act', 'is_test', 'name'], varargs=None, keywords=None, defaults=(1, None, None, None, False, None)), ('document', '424e898365195e3ccbc2e7dc8b63605e')) paddle.fluid.layers.embedding (ArgSpec(args=['input', 'size', 'is_sparse', 'is_distributed', 'padding_idx', 'param_attr', 'dtype'], varargs=None, keywords=None, defaults=(False, False, None, None, 'float32')), ('document', '6f9f96d2a1517cd1affebc960c3526f7')) -paddle.fluid.layers.dynamic_lstm (ArgSpec(args=['input', 'size', 'h_0', 'c_0', 'param_attr', 'bias_attr', 'use_peepholes', 'is_reverse', 'gate_activation', 'cell_activation', 'candidate_activation', 'dtype', 'name'], varargs=None, keywords=None, defaults=(None, None, None, None, True, False, 'sigmoid', 'tanh', 'tanh', 'float32', None)), ('document', '8e35ca26adbe44eb631d71045c8d64d5')) -paddle.fluid.layers.dynamic_lstmp (ArgSpec(args=['input', 'size', 'proj_size', 'param_attr', 'bias_attr', 'use_peepholes', 'is_reverse', 'gate_activation', 'cell_activation', 'candidate_activation', 'proj_activation', 'dtype', 'name', 'h_0', 'c_0', 'cell_clip', 'proj_clip'], varargs=None, keywords=None, defaults=(None, None, True, False, 'sigmoid', 'tanh', 'tanh', 'tanh', 'float32', None, None, None, None, None)), ('document', 'b4b608b986eb9617aa0525e1be21d32d')) +paddle.fluid.layers.dynamic_lstm (ArgSpec(args=['input', 'size', 'h_0', 'c_0', 'param_attr', 'bias_attr', 'use_peepholes', 'is_reverse', 'gate_activation', 'cell_activation', 'candidate_activation', 'dtype', 'name'], varargs=None, keywords=None, defaults=(None, None, None, None, True, False, 'sigmoid', 'tanh', 'tanh', 'float32', None)), ('document', '246ff18abc877dd576653006991918e9')) +paddle.fluid.layers.dynamic_lstmp (ArgSpec(args=['input', 'size', 'proj_size', 'param_attr', 'bias_attr', 'use_peepholes', 'is_reverse', 'gate_activation', 'cell_activation', 'candidate_activation', 'proj_activation', 'dtype', 'name', 'h_0', 'c_0', 'cell_clip', 'proj_clip'], varargs=None, keywords=None, defaults=(None, None, True, False, 'sigmoid', 'tanh', 'tanh', 'tanh', 'float32', None, None, None, None, None)), ('document', '4f63053354bcc6c743b4d2f4e7104e25')) paddle.fluid.layers.dynamic_gru (ArgSpec(args=['input', 'size', 'param_attr', 'bias_attr', 'is_reverse', 'gate_activation', 'candidate_activation', 'h_0', 'origin_mode'], varargs=None, keywords=None, defaults=(None, None, False, 'sigmoid', 'tanh', None, False)), ('document', '83617c165827e030636c80486d5de6f3')) paddle.fluid.layers.gru_unit (ArgSpec(args=['input', 'hidden', 'size', 'param_attr', 'bias_attr', 'activation', 'gate_activation', 'origin_mode'], varargs=None, keywords=None, defaults=(None, None, 'tanh', 'sigmoid', False)), ('document', '33974b9bfa69f2f1eb85e6f956dff04e')) paddle.fluid.layers.linear_chain_crf (ArgSpec(args=['input', 'label', 'param_attr'], varargs=None, keywords=None, defaults=(None,)), ('document', '34f96be41684b0959897a9e735997e20')) @@ -119,7 +119,7 @@ paddle.fluid.layers.dropout (ArgSpec(args=['x', 'dropout_prob', 'is_test', 'seed paddle.fluid.layers.split (ArgSpec(args=['input', 'num_or_sections', 'dim', 'name'], varargs=None, keywords=None, defaults=(-1, None)), ('document', '59b28903ce8fb6a7e3861ff355592eb4')) paddle.fluid.layers.ctc_greedy_decoder (ArgSpec(args=['input', 'blank', 'name'], varargs=None, keywords=None, defaults=(None,)), ('document', '2bc3a59efa9d52b628a6255422d9f0e8')) paddle.fluid.layers.edit_distance (ArgSpec(args=['input', 'label', 'normalized', 'ignored_tokens'], varargs=None, keywords=None, defaults=(True, None)), ('document', 'f2c252aa2f83f8e503ffaf79668eaa28')) -paddle.fluid.layers.l2_normalize (ArgSpec(args=['x', 'axis', 'epsilon', 'name'], varargs=None, keywords=None, defaults=(1e-12, None)), ('document', '35c6a241bcc1a1fc89508860d82ad62b')) +paddle.fluid.layers.l2_normalize (ArgSpec(args=['x', 'axis', 'epsilon', 'name'], varargs=None, keywords=None, defaults=(1e-12, None)), ('document', 'd0484a1f85b40009a794d45a1a298c12')) paddle.fluid.layers.matmul (ArgSpec(args=['x', 'y', 'transpose_x', 'transpose_y', 'alpha', 'name'], varargs=None, keywords=None, defaults=(False, False, 1.0, None)), ('document', 'aa27ca4405e70c6a733cb9806a76af30')) paddle.fluid.layers.topk (ArgSpec(args=['input', 'k', 'name'], varargs=None, keywords=None, defaults=(None,)), ('document', '2a1e9ea041ff4d6a9948bb8d03b743ea')) paddle.fluid.layers.warpctc (ArgSpec(args=['input', 'label', 'blank', 'norm_by_times', 'use_cudnn'], varargs=None, keywords=None, defaults=(0, False, False)), ('document', '4aa9df890b47eb67d5442f04aaf9eeec')) @@ -196,7 +196,7 @@ paddle.fluid.layers.elementwise_floordiv (ArgSpec(args=['x', 'y', 'axis', 'act', paddle.fluid.layers.uniform_random_batch_size_like (ArgSpec(args=['input', 'shape', 'dtype', 'input_dim_idx', 'output_dim_idx', 'min', 'max', 'seed'], varargs=None, keywords=None, defaults=('float32', 0, 0, -1.0, 1.0, 0)), ('document', 'c8c7518358cfbb3822a019e6b5fbea52')) paddle.fluid.layers.gaussian_random (ArgSpec(args=['shape', 'mean', 'std', 'seed', 'dtype'], varargs=None, keywords=None, defaults=(0.0, 1.0, 0, 'float32')), ('document', '8c78ccb77e291e4a0f0673d34823ce4b')) paddle.fluid.layers.sampling_id (ArgSpec(args=['x', 'min', 'max', 'seed', 'dtype'], varargs=None, keywords=None, defaults=(0.0, 1.0, 0, 'float32')), ('document', '35428949368cad5121dd37f8522ef8b0')) -paddle.fluid.layers.gaussian_random_batch_size_like (ArgSpec(args=['input', 'shape', 'input_dim_idx', 'output_dim_idx', 'mean', 'std', 'seed', 'dtype'], varargs=None, keywords=None, defaults=(0, 0, 0.0, 1.0, 0, 'float32')), ('document', '9e520987168f8ddb7dd71ffd68aa352c')) +paddle.fluid.layers.gaussian_random_batch_size_like (ArgSpec(args=['input', 'shape', 'input_dim_idx', 'output_dim_idx', 'mean', 'std', 'seed', 'dtype'], varargs=None, keywords=None, defaults=(0, 0, 0.0, 1.0, 0, 'float32')), ('document', '7536418f4cf0360a1a897c265f06e77e')) paddle.fluid.layers.sum (ArgSpec(args=['x'], varargs=None, keywords=None, defaults=None), ('document', '4527fd90e222f67b5f7451fb0cf7c845')) paddle.fluid.layers.slice (ArgSpec(args=['input', 'axes', 'starts', 'ends'], varargs=None, keywords=None, defaults=None), ('document', '3ca6a761570d86e303e473afba99bb49')) paddle.fluid.layers.shape (ArgSpec(args=['input'], varargs=None, keywords=None, defaults=None), ('document', 'bf61c8f79d795a8371bdb3b5468aa82b')) @@ -341,17 +341,17 @@ paddle.fluid.layers.uniform_random (ArgSpec(args=['shape', 'dtype', 'min', 'max' paddle.fluid.layers.hard_shrink (ArgSpec(args=['x', 'threshold'], varargs=None, keywords=None, defaults=(None,)), ('document', 'c142f5884f3255e0d6075c286bbd531e')) paddle.fluid.layers.cumsum (ArgSpec(args=['x', 'axis', 'exclusive', 'reverse'], varargs=None, keywords=None, defaults=(None, None, None)), ('document', '944d7c03057f5fc88bc78acd4d82f926')) paddle.fluid.layers.thresholded_relu (ArgSpec(args=['x', 'threshold'], varargs=None, keywords=None, defaults=(None,)), ('document', '90566ea449ea4c681435546e2f70610a')) -paddle.fluid.layers.prior_box (ArgSpec(args=['input', 'image', 'min_sizes', 'max_sizes', 'aspect_ratios', 'variance', 'flip', 'clip', 'steps', 'offset', 'name', 'min_max_aspect_ratios_order'], varargs=None, keywords=None, defaults=(None, [1.0], [0.1, 0.1, 0.2, 0.2], False, False, [0.0, 0.0], 0.5, None, False)), ('document', 'a00d43a08ec664454e8e685bc54e9e78')) -paddle.fluid.layers.density_prior_box (ArgSpec(args=['input', 'image', 'densities', 'fixed_sizes', 'fixed_ratios', 'variance', 'clip', 'steps', 'offset', 'flatten_to_2d', 'name'], varargs=None, keywords=None, defaults=(None, None, None, [0.1, 0.1, 0.2, 0.2], False, [0.0, 0.0], 0.5, False, None)), ('document', '7e62e12ce8b127f2c7ce8db79299c3c3')) +paddle.fluid.layers.prior_box (ArgSpec(args=['input', 'image', 'min_sizes', 'max_sizes', 'aspect_ratios', 'variance', 'flip', 'clip', 'steps', 'offset', 'name', 'min_max_aspect_ratios_order'], varargs=None, keywords=None, defaults=(None, [1.0], [0.1, 0.1, 0.2, 0.2], False, False, [0.0, 0.0], 0.5, None, False)), ('document', 'b351a05b758f7e5370898cc7d7d40dca')) +paddle.fluid.layers.density_prior_box (ArgSpec(args=['input', 'image', 'densities', 'fixed_sizes', 'fixed_ratios', 'variance', 'clip', 'steps', 'offset', 'flatten_to_2d', 'name'], varargs=None, keywords=None, defaults=(None, None, None, [0.1, 0.1, 0.2, 0.2], False, [0.0, 0.0], 0.5, False, None)), ('document', '05c43e8fd25efe34f75e35a2c045ded3')) paddle.fluid.layers.multi_box_head (ArgSpec(args=['inputs', 'image', 'base_size', 'num_classes', 'aspect_ratios', 'min_ratio', 'max_ratio', 'min_sizes', 'max_sizes', 'steps', 'step_w', 'step_h', 'offset', 'variance', 'flip', 'clip', 'kernel_size', 'pad', 'stride', 'name', 'min_max_aspect_ratios_order'], varargs=None, keywords=None, defaults=(None, None, None, None, None, None, None, 0.5, [0.1, 0.1, 0.2, 0.2], True, False, 1, 0, 1, None, False)), ('document', 'fd58078fdfffd899b91f992ba224628f')) paddle.fluid.layers.bipartite_match (ArgSpec(args=['dist_matrix', 'match_type', 'dist_threshold', 'name'], varargs=None, keywords=None, defaults=(None, None, None)), ('document', '3ddb9b966f193900193a95a3df77c3c1')) paddle.fluid.layers.target_assign (ArgSpec(args=['input', 'matched_indices', 'negative_indices', 'mismatch_value', 'name'], varargs=None, keywords=None, defaults=(None, None, None)), ('document', 'e9685f32d21bec8c013626c0254502c5')) paddle.fluid.layers.detection_output (ArgSpec(args=['loc', 'scores', 'prior_box', 'prior_box_var', 'background_label', 'nms_threshold', 'nms_top_k', 'keep_top_k', 'score_threshold', 'nms_eta'], varargs=None, keywords=None, defaults=(0, 0.3, 400, 200, 0.01, 1.0)), ('document', 'efae414c1137c7944d6174dd08c5347a')) -paddle.fluid.layers.ssd_loss (ArgSpec(args=['location', 'confidence', 'gt_box', 'gt_label', 'prior_box', 'prior_box_var', 'background_label', 'overlap_threshold', 'neg_pos_ratio', 'neg_overlap', 'loc_loss_weight', 'conf_loss_weight', 'match_type', 'mining_type', 'normalize', 'sample_size'], varargs=None, keywords=None, defaults=(None, 0, 0.5, 3.0, 0.5, 1.0, 1.0, 'per_prediction', 'max_negative', True, None)), ('document', '6d5028fd09d01ab82d296adc0ea95aee')) -paddle.fluid.layers.rpn_target_assign (ArgSpec(args=['bbox_pred', 'cls_logits', 'anchor_box', 'anchor_var', 'gt_boxes', 'is_crowd', 'im_info', 'rpn_batch_size_per_im', 'rpn_straddle_thresh', 'rpn_fg_fraction', 'rpn_positive_overlap', 'rpn_negative_overlap', 'use_random'], varargs=None, keywords=None, defaults=(256, 0.0, 0.5, 0.7, 0.3, True)), ('document', '1e164a56fe9376e18a56d22563d9f801')) +paddle.fluid.layers.ssd_loss (ArgSpec(args=['location', 'confidence', 'gt_box', 'gt_label', 'prior_box', 'prior_box_var', 'background_label', 'overlap_threshold', 'neg_pos_ratio', 'neg_overlap', 'loc_loss_weight', 'conf_loss_weight', 'match_type', 'mining_type', 'normalize', 'sample_size'], varargs=None, keywords=None, defaults=(None, 0, 0.5, 3.0, 0.5, 1.0, 1.0, 'per_prediction', 'max_negative', True, None)), ('document', '055bd5070ad72dccc0949b4ed036f39c')) +paddle.fluid.layers.rpn_target_assign (ArgSpec(args=['bbox_pred', 'cls_logits', 'anchor_box', 'anchor_var', 'gt_boxes', 'is_crowd', 'im_info', 'rpn_batch_size_per_im', 'rpn_straddle_thresh', 'rpn_fg_fraction', 'rpn_positive_overlap', 'rpn_negative_overlap', 'use_random'], varargs=None, keywords=None, defaults=(256, 0.0, 0.5, 0.7, 0.3, True)), ('document', '70d0109c864bced99b6b0aca4574af5e')) paddle.fluid.layers.retinanet_target_assign (ArgSpec(args=['bbox_pred', 'cls_logits', 'anchor_box', 'anchor_var', 'gt_boxes', 'gt_labels', 'is_crowd', 'im_info', 'num_classes', 'positive_overlap', 'negative_overlap'], varargs=None, keywords=None, defaults=(1, 0.5, 0.4)), ('document', 'fa1d1c9d5e0111684c0db705f86a2595')) paddle.fluid.layers.sigmoid_focal_loss (ArgSpec(args=['x', 'label', 'fg_num', 'gamma', 'alpha'], varargs=None, keywords=None, defaults=(2, 0.25)), ('document', 'aeac6aae100173b3fc7f102cf3023a3d')) -paddle.fluid.layers.anchor_generator (ArgSpec(args=['input', 'anchor_sizes', 'aspect_ratios', 'variance', 'stride', 'offset', 'name'], varargs=None, keywords=None, defaults=(None, None, [0.1, 0.1, 0.2, 0.2], None, 0.5, None)), ('document', '82b2aefeeb1b706bc4afec70928a259a')) +paddle.fluid.layers.anchor_generator (ArgSpec(args=['input', 'anchor_sizes', 'aspect_ratios', 'variance', 'stride', 'offset', 'name'], varargs=None, keywords=None, defaults=(None, None, [0.1, 0.1, 0.2, 0.2], None, 0.5, None)), ('document', 'acc23232f4c8c03791598500b5bf7790')) paddle.fluid.layers.roi_perspective_transform (ArgSpec(args=['input', 'rois', 'transformed_height', 'transformed_width', 'spatial_scale'], varargs=None, keywords=None, defaults=(1.0,)), ('document', 'd1ddc75629fedee46f82e631e22c79dc')) paddle.fluid.layers.generate_proposal_labels (ArgSpec(args=['rpn_rois', 'gt_classes', 'is_crowd', 'gt_boxes', 'im_info', 'batch_size_per_im', 'fg_fraction', 'fg_thresh', 'bg_thresh_hi', 'bg_thresh_lo', 'bbox_reg_weights', 'class_nums', 'use_random', 'is_cls_agnostic', 'is_cascade_rcnn'], varargs=None, keywords=None, defaults=(256, 0.25, 0.25, 0.5, 0.0, [0.1, 0.1, 0.2, 0.2], None, True, False, False)), ('document', 'c0d00acf724691ff3480d4207036a722')) paddle.fluid.layers.generate_proposals (ArgSpec(args=['scores', 'bbox_deltas', 'im_info', 'anchors', 'variances', 'pre_nms_top_n', 'post_nms_top_n', 'nms_thresh', 'min_size', 'eta', 'name'], varargs=None, keywords=None, defaults=(6000, 1000, 0.5, 0.1, 1.0, None)), ('document', 'b7d707822b6af2a586bce608040235b1')) diff --git a/paddle/fluid/inference/api/demo_ci/run.sh b/paddle/fluid/inference/api/demo_ci/run.sh index bf2e3593c2beadaea2cb08aa3dcc2370c3e06bf4..054f9de3d7e51097c9a8597d2e337dbc71c4ef7b 100755 --- a/paddle/fluid/inference/api/demo_ci/run.sh +++ b/paddle/fluid/inference/api/demo_ci/run.sh @@ -4,7 +4,7 @@ PADDLE_ROOT=$1 TURN_ON_MKL=$2 # use MKL or Openblas TEST_GPU_CPU=$3 # test both GPU/CPU mode or only CPU mode DATA_DIR=$4 # dataset -TENSORRT_INCLUDE_DIR=$5 # TensorRT header file dir, defalut to /usr/local/TensorRT/include +TENSORRT_INCLUDE_DIR=$5 # TensorRT header file dir, default to /usr/local/TensorRT/include TENSORRT_LIB_DIR=$6 # TensorRT lib file dir, default to /usr/local/TensorRT/lib inference_install_dir=${PADDLE_ROOT}/build/fluid_inference_install_dir diff --git a/paddle/fluid/operators/attention_lstm_op.cc b/paddle/fluid/operators/attention_lstm_op.cc index aecd3d430231855fa29cf7716eb636cdb28182ce..f991bef96529b0a86ccf96822b95fb4e4c274d6f 100644 --- a/paddle/fluid/operators/attention_lstm_op.cc +++ b/paddle/fluid/operators/attention_lstm_op.cc @@ -207,7 +207,7 @@ void AttentionLSTMOpMaker::Make() { .InEnum({"sigmoid", "tanh", "relu", "identity"}); AddAttr("cell_activation", "(string, default: tanh)" - "The activation for cell output, `tanh` by defalut.") + "The activation for cell output, `tanh` by default.") .SetDefault("tanh") .InEnum({"sigmoid", "tanh", "relu", "identity"}); AddAttr("candidate_activation", diff --git a/paddle/fluid/operators/batch_norm_op.cu b/paddle/fluid/operators/batch_norm_op.cu index f8baf082597d6152257e2ea74f14b6903a7be332..a78a6726bc5a59cc84494656dc53e31e40eb82b3 100644 --- a/paddle/fluid/operators/batch_norm_op.cu +++ b/paddle/fluid/operators/batch_norm_op.cu @@ -31,7 +31,7 @@ limitations under the License. */ // input data range. DEFINE_bool(cudnn_batchnorm_spatial_persistent, false, "Whether enable CUDNN_BATCHNORM_SPATIAL_PERSISTENT mode for cudnn " - "batch_norm, defalut is False."); + "batch_norm, default is False."); namespace paddle { namespace operators { diff --git a/paddle/fluid/operators/conv_cudnn_op.cu.cc b/paddle/fluid/operators/conv_cudnn_op.cu.cc index 054deeaa710c8e058118b33662a15542678bf961..3dfd1b4ef2dc2194388600e1b9027a4369dddfc6 100644 --- a/paddle/fluid/operators/conv_cudnn_op.cu.cc +++ b/paddle/fluid/operators/conv_cudnn_op.cu.cc @@ -33,7 +33,7 @@ DEFINE_uint64(conv_workspace_size_limit, "cuDNN convolution workspace limit in MB unit."); DEFINE_bool(cudnn_exhaustive_search, false, "Whether enable exhaustive search for cuDNN convolution or " - "not, defalut is False."); + "not, default is False."); namespace paddle { namespace operators { @@ -102,7 +102,7 @@ class CUDNNConvOpKernel : public framework::OpKernel { conv_desc.descriptor(paddings, strides, dilations); #if CUDNN_VERSION_MIN(7, 0, 1) - // cudnn 7 can support groups, no need to do it mannually + // cudnn 7 can support groups, no need to do it manually // FIXME(typhoonzero): find a better way to disable groups // rather than setting it to 1. CUDNN_ENFORCE(platform::dynload::cudnnSetConvolutionGroupCount( @@ -300,7 +300,7 @@ class CUDNNConvGradOpKernel : public framework::OpKernel { FLAGS_cudnn_exhaustive_search || ctx.Attr("exhaustive_search"); if (exhaustive_search && FLAGS_cudnn_deterministic) { PADDLE_THROW( - "Cann't set exhaustive_search True and " + "Can't set exhaustive_search True and " "FLAGS_cudnn_deterministic True at same time."); } @@ -320,7 +320,7 @@ class CUDNNConvGradOpKernel : public framework::OpKernel { conv_desc.descriptor(paddings, strides, dilations); #if CUDNN_VERSION_MIN(7, 0, 1) - // cudnn 7 can support groups, no need to do it mannually + // cudnn 7 can support groups, no need to do it manually // FIXME(typhoonzero): find a better way to disable groups // rather than setting it to 1. CUDNN_ENFORCE(platform::dynload::cudnnSetConvolutionGroupCount( @@ -665,7 +665,7 @@ class CUDNNConvDoubleGradOpKernel : public framework::OpKernel { bool deterministic = FLAGS_cudnn_deterministic; if (exhaustive_search && deterministic) { PADDLE_THROW( - "Cann't set exhaustive_search True and " + "Can't set exhaustive_search True and " "FLAGS_cudnn_deterministic True at same time."); } diff --git a/paddle/fluid/operators/conv_fusion_op.cu.cc b/paddle/fluid/operators/conv_fusion_op.cu.cc index 87b656d8a990f5bfcbe174b05b32cbf94db21fec..d1fa7b9d5bd81b164e51cb7a5353ed1d06f221b1 100644 --- a/paddle/fluid/operators/conv_fusion_op.cu.cc +++ b/paddle/fluid/operators/conv_fusion_op.cu.cc @@ -18,7 +18,7 @@ limitations under the License. */ DEFINE_int64(cudnn_exhaustive_search_times, -1, "Exhaustive search times for cuDNN convolution, " - "defalut is -1, not exhaustive search"); + "default is -1, not exhaustive search"); namespace paddle { namespace operators { diff --git a/paddle/fluid/operators/conv_op.cc b/paddle/fluid/operators/conv_op.cc index ee37585a709f3068fadb2336a81e8b15b1c083a2..5c48a8ee8f56e8010a9263d8a2a460a1d22d420c 100644 --- a/paddle/fluid/operators/conv_op.cc +++ b/paddle/fluid/operators/conv_op.cc @@ -259,7 +259,7 @@ void Conv2DOpMaker::Make() { AddAttr("exhaustive_search", "(bool, default false) cuDNN has many algorithm to calculation " "convolution, whether enable exhaustive search " - "for cuDNN convolution or not, defalut is False.") + "for cuDNN convolution or not, default is False.") .SetDefault(false); AddComment(R"DOC( Convolution Operator. @@ -378,7 +378,7 @@ void Conv3DOpMaker::Make() { AddAttr("exhaustive_search", "(bool, default false) cuDNN has many algorithm to calculation " "convolution, whether enable exhaustive search " - "for cuDNN convolution or not, defalut is False.") + "for cuDNN convolution or not, default is False.") .SetDefault(false); AddComment(R"DOC( Convolution3D Operator. diff --git a/paddle/fluid/operators/detection/bipartite_match_op.cc b/paddle/fluid/operators/detection/bipartite_match_op.cc index b7da1261a8f9780028bf2d36903e54d7e270bec0..af7797a6d7cde6e81c66a3d29ed36154b6e11529 100644 --- a/paddle/fluid/operators/detection/bipartite_match_op.cc +++ b/paddle/fluid/operators/detection/bipartite_match_op.cc @@ -231,14 +231,14 @@ class BipartiteMatchOpMaker : public framework::OpProtoAndCheckerMaker { "entities."); AddAttr( "match_type", - "(string, defalut: per_prediction) " + "(string, default: per_prediction) " "The type of matching method, should be 'bipartite' or " - "'per_prediction', 'bipartite' by defalut.") + "'per_prediction', 'bipartite' by default.") .SetDefault("bipartite") .InEnum({"bipartite", "per_prediction"}); AddAttr( "dist_threshold", - "(float, defalut: 0.5) " + "(float, default: 0.5) " "If `match_type` is 'per_prediction', this threshold is to determine " "the extra matching bboxes based on the maximum distance.") .SetDefault(0.5); diff --git a/paddle/fluid/operators/detection/multiclass_nms_op.cc b/paddle/fluid/operators/detection/multiclass_nms_op.cc index f357e3ccf905309e6656f3fa87fbee45dc357c1e..8abc8b89d81d3d41fb6b9b587fe33a0b619859af 100644 --- a/paddle/fluid/operators/detection/multiclass_nms_op.cc +++ b/paddle/fluid/operators/detection/multiclass_nms_op.cc @@ -463,7 +463,7 @@ class MultiClassNMSOpMaker : public framework::OpProtoAndCheckerMaker { "Input BBoxes should be the second case with shape [M, C, 4]."); AddAttr( "background_label", - "(int, defalut: 0) " + "(int, default: 0) " "The index of background label, the background label will be ignored. " "If set to -1, then all categories will be considered.") .SetDefault(0); @@ -477,7 +477,7 @@ class MultiClassNMSOpMaker : public framework::OpProtoAndCheckerMaker { "confidences aftern the filtering detections based on " "score_threshold"); AddAttr("nms_threshold", - "(float, defalut: 0.3) " + "(float, default: 0.3) " "The threshold to be used in NMS.") .SetDefault(0.3); AddAttr("nms_eta", diff --git a/paddle/fluid/operators/detection_map_op.cc b/paddle/fluid/operators/detection_map_op.cc index 554e50725ffa5fc30849dc62fe525d72c6561a8b..dff97f7c77fc26af4cd4e7794d9092aec14cfa6e 100644 --- a/paddle/fluid/operators/detection_map_op.cc +++ b/paddle/fluid/operators/detection_map_op.cc @@ -150,7 +150,7 @@ class DetectionMAPOpMaker : public framework::OpProtoAndCheckerMaker { "The class number."); AddAttr( "background_label", - "(int, defalut: 0) " + "(int, default: 0) " "The index of background label, the background label will be ignored. " "If set to -1, then all categories will be considered.") .SetDefault(0); diff --git a/paddle/fluid/operators/fused/fused_embedding_fc_lstm_op.cc b/paddle/fluid/operators/fused/fused_embedding_fc_lstm_op.cc index c8282aefe43b14e3889d86b2aecaa569c7076d4f..35a30854f22062efa594d02fecbbe6571fd75f97 100644 --- a/paddle/fluid/operators/fused/fused_embedding_fc_lstm_op.cc +++ b/paddle/fluid/operators/fused/fused_embedding_fc_lstm_op.cc @@ -174,15 +174,15 @@ void FusedEmbeddingFCLSTMOpMaker::Make() { AddOutput("ReorderedH0", "(LoDTensor) (N x D).").AsIntermediate(); AddOutput("ReorderedC0", "(LoDTensor) (N x D).").AsIntermediate(); AddAttr("use_peepholes", - "(bool, defalut: True) " + "(bool, default: True) " "whether to enable diagonal/peephole connections.") .SetDefault(true); AddAttr("is_reverse", - "(bool, defalut: False) " + "(bool, default: False) " "whether to compute reversed LSTM.") .SetDefault(false); AddAttr("use_seq", - "(bool, defalut: True) " + "(bool, default: True) " "whether to use seq mode to compute.") .SetDefault(true); AddAttr("gate_activation", @@ -193,7 +193,7 @@ void FusedEmbeddingFCLSTMOpMaker::Make() { .InEnum({"sigmoid", "tanh", "relu", "identity"}); AddAttr("cell_activation", "(string, default: tanh)" - "The activation for cell output, `tanh` by defalut.") + "The activation for cell output, `tanh` by default.") .SetDefault("tanh") .InEnum({"sigmoid", "tanh", "relu", "identity"}); AddAttr("candidate_activation", diff --git a/paddle/fluid/operators/fused/fusion_conv_inception_op.cc b/paddle/fluid/operators/fused/fusion_conv_inception_op.cc index 569527c3c16cbe845a1674c846c700b674f7d37d..80cc0eb8cb6f6961e8e6a284ac50c9de35d6e36d 100644 --- a/paddle/fluid/operators/fused/fusion_conv_inception_op.cc +++ b/paddle/fluid/operators/fused/fusion_conv_inception_op.cc @@ -67,7 +67,7 @@ class ConvInceptionFusionOpMaker : public framework::OpProtoAndCheckerMaker { void Make() override { AddInput("Input", "(Tensor) NCHW layout."); AddInput("Filter", "(vector) 4 aggregated filters").AsDuplicable(); - AddInput("Bias", "(vector) it's lenght is equal to Filter") + AddInput("Bias", "(vector) it's length is equal to Filter") .AsDuplicable(); AddOutput("Output", "(Tensor) The output tensor of convolution operator. " @@ -82,7 +82,7 @@ class ConvInceptionFusionOpMaker : public framework::OpProtoAndCheckerMaker { "exclusive", "(bool, default True) When true, will exclude the zero-padding in the " "averaging calculating, otherwise, include the zero-padding. Note, it " - "is only used when pooling_type is avg. The defalut is True.") + "is only used when pooling_type is avg. The default is True.") .SetDefault(true); AddAttr( "activation", diff --git a/paddle/fluid/operators/fused/fusion_gru_op.cc b/paddle/fluid/operators/fused/fusion_gru_op.cc index ba5f0747c4d04bbb41f34dc7f895b22d38392ea6..56c41ef2a8ee096e31ca98b51556e0d0dbc237f6 100644 --- a/paddle/fluid/operators/fused/fusion_gru_op.cc +++ b/paddle/fluid/operators/fused/fusion_gru_op.cc @@ -147,11 +147,11 @@ void FusionGRUOpMaker::Make() { "The activation type used in update gate and reset gate.") .SetDefault("sigmoid"); AddAttr("is_reverse", - "(bool, defalut: False) " + "(bool, default: False) " "whether to compute reversed GRU.") .SetDefault(false); AddAttr("use_seq", - "(bool, defalut: True) " + "(bool, default: True) " "whether to use seq mode to compute GRU.") .SetDefault(true); AddComment(R"DOC( diff --git a/paddle/fluid/operators/fused/fusion_lstm_op.cc b/paddle/fluid/operators/fused/fusion_lstm_op.cc index c8c07bd126d5b4eac688d43fd794856f8222525a..1a31fc7826512a3efda32eb3f5640e78844cfc99 100644 --- a/paddle/fluid/operators/fused/fusion_lstm_op.cc +++ b/paddle/fluid/operators/fused/fusion_lstm_op.cc @@ -179,15 +179,15 @@ void FusionLSTMOpMaker::Make() { AddOutput("CheckedCell", "(Tensor) (2 x D) only for peephole.") .AsIntermediate(); AddAttr("use_peepholes", - "(bool, defalut: True) " + "(bool, default: True) " "whether to enable diagonal/peephole connections.") .SetDefault(true); AddAttr("is_reverse", - "(bool, defalut: False) " + "(bool, default: False) " "whether to compute reversed LSTM.") .SetDefault(false); AddAttr("use_seq", - "(bool, defalut: True) " + "(bool, default: True) " "whether to use seq mode to compute.") .SetDefault(true); AddAttr("gate_activation", @@ -198,7 +198,7 @@ void FusionLSTMOpMaker::Make() { .InEnum({"sigmoid", "tanh", "relu", "identity"}); AddAttr("cell_activation", "(string, default: tanh)" - "The activation for cell output, `tanh` by defalut.") + "The activation for cell output, `tanh` by default.") .SetDefault("tanh") .InEnum({"sigmoid", "tanh", "relu", "identity"}); AddAttr("candidate_activation", diff --git a/paddle/fluid/operators/gaussian_random_batch_size_like_op.cc b/paddle/fluid/operators/gaussian_random_batch_size_like_op.cc index 01302687a421165e908b2aa0646ba8b9c835034e..4d39358477016d4a2ae01aba635347bc26727474 100644 --- a/paddle/fluid/operators/gaussian_random_batch_size_like_op.cc +++ b/paddle/fluid/operators/gaussian_random_batch_size_like_op.cc @@ -58,7 +58,7 @@ class GaussianRandomBatchSizeLikeOpMaker : public BatchSizeLikeOpMaker { AddComment(R"DOC( Used to initialize tensors with gaussian random generator. -The defalut mean of the distribution is 0. and defalut standard +The default mean of the distribution is 0. and default standard deviation (std) of the distribution is 1.. Uers can set mean and std by input arguments. )DOC"); diff --git a/paddle/fluid/operators/gru_op.cc b/paddle/fluid/operators/gru_op.cc index 7437d7bd2092044b6634aa720fbee1a02b630bcd..9797160c9622671a820e2b9872305745df176979 100644 --- a/paddle/fluid/operators/gru_op.cc +++ b/paddle/fluid/operators/gru_op.cc @@ -137,7 +137,7 @@ class GRUOpMaker : public framework::OpProtoAndCheckerMaker { "The activation type used in update gate and reset gate.") .SetDefault("sigmoid"); AddAttr("is_reverse", - "(bool, defalut: False) " + "(bool, default: False) " "whether to compute reversed GRU.") .SetDefault(false); AddAttr("origin_mode", diff --git a/paddle/fluid/operators/lstm_op.cc b/paddle/fluid/operators/lstm_op.cc index 52e4e8be28746d42ebbda9a5148a9495d0d80c6a..bf68c57e67fbff9216f51d805c78e49714fdb736 100644 --- a/paddle/fluid/operators/lstm_op.cc +++ b/paddle/fluid/operators/lstm_op.cc @@ -153,11 +153,11 @@ class LSTMOpMaker : public framework::OpProtoAndCheckerMaker { "in the backward.") .AsIntermediate(); AddAttr("use_peepholes", - "(bool, defalut: True) " + "(bool, default: True) " "whether to enable diagonal/peephole connections.") .SetDefault(true); AddAttr("is_reverse", - "(bool, defalut: False) " + "(bool, default: False) " "whether to compute reversed LSTM.") .SetDefault(false); AddAttr( @@ -169,7 +169,7 @@ class LSTMOpMaker : public framework::OpProtoAndCheckerMaker { .InEnum({"sigmoid", "tanh", "relu", "identity"}); AddAttr("cell_activation", "(string, default: tanh)" - "The activation for cell output, `tanh` by defalut.") + "The activation for cell output, `tanh` by default.") .SetDefault("tanh") .InEnum({"sigmoid", "tanh", "relu", "identity"}); AddAttr("candidate_activation", @@ -181,7 +181,7 @@ class LSTMOpMaker : public framework::OpProtoAndCheckerMaker { AddComment(R"DOC( Long-Short Term Memory (LSTM) Operator. -The defalut implementation is diagonal/peephole connection +The default implementation is diagonal/peephole connection (https://arxiv.org/pdf/1402.1128.pdf), the formula is as follows: $$ i_t = \\sigma(W_{ix}x_{t} + W_{ih}h_{t-1} + W_{ic}c_{t-1} + b_i) $$ @@ -199,7 +199,7 @@ $$ h_t = o_t \\odot act_h(c_t) $$ - W terms denote weight matrices (e.g. $W_{xi}$ is the matrix of weights from the input gate to the input), $W_{ic}, W_{fc}, W_{oc}$ are diagonal weight matrices for peephole connections. In our implementation, - we use vectors to reprenset these diagonal weight matrices. + we use vectors to represent these diagonal weight matrices. - The b terms denote bias vectors ($b_i$ is the input gate bias vector). - $\sigma$ is the non-line activations, such as logistic sigmoid function. - $i, f, o$ and $c$ are the input gate, forget gate, output gate, diff --git a/paddle/fluid/operators/lstmp_op.cc b/paddle/fluid/operators/lstmp_op.cc index f31c177c92d0a9e4cc731c478ea8339b450f318a..b9f42237180007eecc8b558c6939a7156dfc6e45 100644 --- a/paddle/fluid/operators/lstmp_op.cc +++ b/paddle/fluid/operators/lstmp_op.cc @@ -177,20 +177,20 @@ class LSTMPOpMaker : public framework::OpProtoAndCheckerMaker { "backward.") .AsIntermediate(); AddAttr("use_peepholes", - "(bool, defalut: True) " + "(bool, default: True) " "whether to enable diagonal/peephole connections.") .SetDefault(true); AddAttr("is_reverse", - "(bool, defalut: False) " + "(bool, default: False) " "whether to compute reversed LSTMP.") .SetDefault(false); AddAttr("cell_clip", - "(float, defalut: 0.0) " + "(float, default: 0.0) " "Clip for Tensor for cell state tensor when clip value is " "greater than 0.0") .SetDefault(0.0); AddAttr("proj_clip", - "(float, defalut: 0.0) " + "(float, default: 0.0) " "Clip for Tensor for projection tensor when clip value is " "greater than 0.0") .SetDefault(0.0); @@ -203,7 +203,7 @@ class LSTMPOpMaker : public framework::OpProtoAndCheckerMaker { .InEnum({"sigmoid", "tanh", "relu", "identity"}); AddAttr("cell_activation", "(string, default: tanh)" - "The activation for cell output, `tanh` by defalut.") + "The activation for cell output, `tanh` by default.") .SetDefault("tanh") .InEnum({"sigmoid", "tanh", "relu", "identity"}); AddAttr("candidate_activation", @@ -215,7 +215,7 @@ class LSTMPOpMaker : public framework::OpProtoAndCheckerMaker { AddAttr("proj_activation", "(string, default: tanh)" "The activation for projection output, " - "`tanh` by defalut.") + "`tanh` by default.") .SetDefault("tanh") .InEnum({"sigmoid", "tanh", "relu", "identity"}); AddComment(R"DOC( @@ -248,7 +248,7 @@ $$ where the W terms denote weight matrices (e.g. $W_{xi}$ is the matrix of weights from the input gate to the input), $W_{ic}, W_{fc}, W_{oc}$ are diagonal weight matrices for peephole connections. In our implementation, -we use vectors to reprenset these diagonal weight matrices. The b terms +we use vectors to represent these diagonal weight matrices. The b terms denote bias vectors ($b_i$ is the input gate bias vector), $\sigma$ is the activation, such as logistic sigmoid function, and $i, f, o$ and $c$ are the input gate, forget gate, output gate, diff --git a/paddle/fluid/operators/pool_op.cc b/paddle/fluid/operators/pool_op.cc index 7963c27a0153105b9ab21c7165b5e4daad8346ea..af0665f4a12acfa9fd9c0642da671af57f9e3f89 100644 --- a/paddle/fluid/operators/pool_op.cc +++ b/paddle/fluid/operators/pool_op.cc @@ -190,7 +190,7 @@ void Pool2dOpMaker::Make() { "exclusive", "(bool, default True) When true, will exclude the zero-padding in the " "averaging calculating, otherwise, include the zero-padding. Note, it " - "is only used when pooling_type is avg. The defalut is True.") + "is only used when pooling_type is avg. The default is True.") .SetDefault(true); AddAttr( "adaptive", @@ -360,7 +360,7 @@ void Pool3dOpMaker::Make() { "exclusive", "(bool, default True) When true, will exclude the zero-padding in the " "averaging calculating, otherwise, include the zero-padding. Note, it " - "is only used when pooling_type is avg. The defalut is True.") + "is only used when pooling_type is avg. The default is True.") .SetDefault(true); AddAttr( "adaptive", diff --git a/paddle/fluid/operators/unpool_op.cc b/paddle/fluid/operators/unpool_op.cc index 86b4c06a27cc63fca8ec077cb3044ffe9415e01d..fae5041c9328fe48aed388c1400aefaaf8bea5e7 100644 --- a/paddle/fluid/operators/unpool_op.cc +++ b/paddle/fluid/operators/unpool_op.cc @@ -46,7 +46,7 @@ class Unpool2dOpMaker : public framework::OpProtoAndCheckerMaker { "strides (height, width) of unpooling operator.") .SetDefault({1, 1}); AddAttr>("paddings", - "(vector defalut:{0,0}), " + "(vector default:{0,0}), " "paddings (height, width) of unpooling operator.") .SetDefault({0, 0}); AddAttr( diff --git a/python/paddle/fluid/contrib/slim/quantization/quantization_strategy.py b/python/paddle/fluid/contrib/slim/quantization/quantization_strategy.py index c3d977f708f443951e4d05809531161a9257e7ae..bf4313784eab0f846c2a2a45d7ed98509103d94f 100644 --- a/python/paddle/fluid/contrib/slim/quantization/quantization_strategy.py +++ b/python/paddle/fluid/contrib/slim/quantization/quantization_strategy.py @@ -53,11 +53,11 @@ class QuantizationStrategy(Strategy): start_epoch(int): The 'on_epoch_begin' function will be called in start_epoch. default: 0 end_epoch(int): The 'on_epoch_end' function will be called in end_epoch. default: 0 float_model_save_path(str): The path to save model with float weights. - None means it doesn't save float model. defalut: None. + None means it doesn't save float model. default: None. mobile_model_save_path(str): The path to save model for paddle-mobile execution. - None means it doesn't save mobile model. defalut: None. + None means it doesn't save mobile model. default: None. int8_model_save_path(str): The path to save model with int8_t weight. - None means it doesn't save int8 model. defalut: None. + None means it doesn't save int8 model. default: None. activation_bits(int): quantization bit number for activation. default: 8. weight_bits(int): quantization bit number for weights. The bias is not quantized. default: 8. @@ -90,7 +90,7 @@ class QuantizationStrategy(Strategy): def restore_from_checkpoint(self, context): """ - Restore graph when the compressoin task is inited from checkpoint. + Restore graph when the compression task is inited from checkpoint. """ # It is inited from checkpoint and has missed start epoch. if context.epoch_id != 0 and context.epoch_id > self.start_epoch: @@ -100,7 +100,7 @@ class QuantizationStrategy(Strategy): def _modify_graph_for_quantization(self, context): """ - Insert fake_quantize_op and fake_dequantize_op before trainging and testing. + Insert fake_quantize_op and fake_dequantize_op before training and testing. """ train_ir_graph = IrGraph( core.Graph(context.optimize_graph.program.clone().desc), @@ -151,7 +151,7 @@ class QuantizationStrategy(Strategy): def on_epoch_begin(self, context): """ - Insert fake_quantize_op and fake_dequantize_op before trainging and testing. + Insert fake_quantize_op and fake_dequantize_op before training and testing. """ super(QuantizationStrategy, self).on_epoch_begin(context) if self.start_epoch == context.epoch_id: diff --git a/python/paddle/fluid/contrib/slim/tests/quantization/compress.yaml b/python/paddle/fluid/contrib/slim/tests/quantization/compress.yaml index a3a5a724fbfcac41ed4ab286caac184c2fe104ad..8bdfd5086135c022a648d1a0a08f073ecef83961 100644 --- a/python/paddle/fluid/contrib/slim/tests/quantization/compress.yaml +++ b/python/paddle/fluid/contrib/slim/tests/quantization/compress.yaml @@ -1,15 +1,15 @@ #start_epoch(int): The epoch to insert quantization operators. default: 0 # -#end_epoch(int): The epoch to save inferecne model. default: 0 +#end_epoch(int): The epoch to save inference model. default: 0 # #float_model_save_path(str): The path to save model with float weights. -# None means it doesn't save float model. defalut: None. +# None means it doesn't save float model. default: None. # #mobile_model_save_path(str): The path to save model for paddle-mobile execution. -# None means it doesn't save mobile model. defalut: None. +# None means it doesn't save mobile model. default: None. # #int8_model_save_path(str): The path to save model with int8_t weight. -# None means it doesn't save int8 model. defalut: None. +# None means it doesn't save int8 model. default: None. # #activation_bits(int): quantization bit number for activation. default: 8. # diff --git a/python/paddle/fluid/evaluator.py b/python/paddle/fluid/evaluator.py index bde828a66910b6b7d1ba8580ba8973cd04896f6e..5a4c838f75bb45b3adedc9905f09c0b7ad0a68ed 100644 --- a/python/paddle/fluid/evaluator.py +++ b/python/paddle/fluid/evaluator.py @@ -324,11 +324,11 @@ class DetectionMAP(Evaluator): class_num (int): The class number. background_label (int): The index of background label, the background label will be ignored. If set to -1, then all categories will be - considered, 0 by defalut. + considered, 0 by default. overlap_threshold (float): The threshold for deciding true/false - positive, 0.5 by defalut. + positive, 0.5 by default. evaluate_difficult (bool): Whether to consider difficult ground truth - for evaluation, True by defalut. This argument does not work when + for evaluation, True by default. This argument does not work when gt_difficult is None. ap_version (string): The average precision calculation ways, it must be 'integral' or '11point'. Please check diff --git a/python/paddle/fluid/layers/detection.py b/python/paddle/fluid/layers/detection.py index 36877269faa0b636a672454b3d682b89a5b94a30..3e7ef139c1bfdb4710b244b0f29f1bcef327c2d6 100644 --- a/python/paddle/fluid/layers/detection.py +++ b/python/paddle/fluid/layers/detection.py @@ -265,7 +265,7 @@ def rpn_target_assign(bbox_pred, coordinate of the anchor box. anchor_var(Variable): A 2-D Tensor with shape [M,4] holds expanded variances of anchors. - gt_boxes (Variable): The ground-truth boudding boxes (bboxes) are a 2D + gt_boxes (Variable): The ground-truth bounding boxes (bboxes) are a 2D LoDTensor with shape [Ng, 4], Ng is the total number of ground-truth bboxes of mini-batch input. is_crowd (Variable): A 1-D LoDTensor which indicates groud-truth is crowd. @@ -1258,8 +1258,8 @@ def ssd_loss(location, """ **Multi-box loss layer for object detection algorithm of SSD** - This layer is to compute dection loss for SSD given the location offset - predictions, confidence predictions, prior boxes and ground-truth boudding + This layer is to compute detection loss for SSD given the location offset + predictions, confidence predictions, prior boxes and ground-truth bounding boxes and labels, and the type of hard example mining. The returned loss is a weighted sum of the localization loss (or regression loss) and confidence loss (or classification loss) by performing the following steps: @@ -1303,7 +1303,7 @@ def ssd_loss(location, confidence (Variable): The confidence predictions are a 3D Tensor with shape [N, Np, C], N and Np are the same as they are in `location`, C is the class number. - gt_box (Variable): The ground-truth boudding boxes (bboxes) are a 2D + gt_box (Variable): The ground-truth bounding boxes (bboxes) are a 2D LoDTensor with shape [Ng, 4], Ng is the total number of ground-truth bboxes of mini-batch input. gt_label (Variable): The ground-truth labels are a 2D LoDTensor @@ -1316,14 +1316,14 @@ def ssd_loss(location, `overlap_threshold` to determine the extra matching bboxes when finding matched boxes. 0.5 by default. neg_pos_ratio (float): The ratio of the negative boxes to the positive - boxes, used only when mining_type is 'max_negative', 3.0 by defalut. + boxes, used only when mining_type is 'max_negative', 3.0 by default. neg_overlap (float): The negative overlap upper bound for the unmatched predictions. Use only when mining_type is 'max_negative', 0.5 by default. loc_loss_weight (float): Weight for localization loss, 1.0 by default. conf_loss_weight (float): Weight for confidence loss, 1.0 by default. match_type (str): The type of matching method during training, should - be 'bipartite' or 'per_prediction', 'per_prediction' by defalut. + be 'bipartite' or 'per_prediction', 'per_prediction' by default. mining_type (str): The hard example mining type, should be 'hard_example' or 'max_negative', now only support `max_negative`. normalize (bool): Whether to normalize the SSD loss by the total number @@ -1507,7 +1507,7 @@ def prior_box(input, Default:[0.1, 0.1, 0.2, 0.2]. flip(bool): Whether to flip aspect ratios. Default:False. clip(bool): Whether to clip out-of-boundary boxes. Default: False. - step(list|turple): Prior boxes step across width and height, If + step(list|tuple): Prior boxes step across width and height, If step[0] == 0.0/step[1] == 0.0, the prior boxes step across height/weight of the input will be automatically calculated. Default: [0., 0.] @@ -1636,7 +1636,7 @@ def density_prior_box(input, variance(list|tuple): the variances to be encoded in density prior boxes. Default:[0.1, 0.1, 0.2, 0.2]. clip(bool): Whether to clip out-of-boundary boxes. Default: False. - step(list|turple): Prior boxes step across width and height, If + step(list|tuple): Prior boxes step across width and height, If step[0] == 0.0/step[1] == 0.0, the density prior boxes step across height/weight of the input will be automatically calculated. Default: [0., 0.] @@ -2003,7 +2003,7 @@ def anchor_generator(input, anchors, e.g. [0.5, 1.0, 2.0]. variance(list|tuple): The variances to be used in box regression deltas. Default:[0.1, 0.1, 0.2, 0.2]. - stride(list|turple): The anchors stride across width and height,e.g. [16.0, 16.0] + stride(list|tuple): The anchors stride across width and height,e.g. [16.0, 16.0] offset(float): Prior boxes center offset. Default: 0.5 name(str): Name of the prior box op. Default: None. diff --git a/python/paddle/fluid/layers/nn.py b/python/paddle/fluid/layers/nn.py index 184c550daabca6057292cb8d527bacd4c542b6a0..54387fc71e32e7567b6862388dd59b79e7b18177 100644 --- a/python/paddle/fluid/layers/nn.py +++ b/python/paddle/fluid/layers/nn.py @@ -770,7 +770,7 @@ def dynamic_lstmp(input, the matrix of weights from the input gate to the input). * :math:`W_{ic}`, :math:`W_{fc}`, :math:`W_{oc}`: Diagonal weight \ matrices for peephole connections. In our implementation, \ - we use vectors to reprenset these diagonal weight matrices. + we use vectors to represent these diagonal weight matrices. * :math:`b`: Denotes bias vectors (e.g. :math:`b_i` is the input gate \ bias vector). * :math:`\sigma`: The activation, such as logistic sigmoid function. @@ -5083,7 +5083,7 @@ def l2_normalize(x, axis, epsilon=1e-12, name=None): the dimension to normalization is rank(X) + axis. -1 is the last dimension. epsilon(float): The epsilon value is used to avoid division by zero, \ - the defalut value is 1e-12. + the default value is 1e-12. name(str|None): A name for this layer(optional). If set None, the layer \ will be named automatically. diff --git a/python/paddle/fluid/metrics.py b/python/paddle/fluid/metrics.py index 946c6ff6565745c8c686659f70d191f9757f4ee7..782a0762af9216fdd0f2739af1ce57a25e66ccbb 100644 --- a/python/paddle/fluid/metrics.py +++ b/python/paddle/fluid/metrics.py @@ -714,11 +714,11 @@ class DetectionMAP(object): class_num (int): The class number. background_label (int): The index of background label, the background label will be ignored. If set to -1, then all categories will be - considered, 0 by defalut. + considered, 0 by default. overlap_threshold (float): The threshold for deciding true/false - positive, 0.5 by defalut. + positive, 0.5 by default. evaluate_difficult (bool): Whether to consider difficult ground truth - for evaluation, True by defalut. This argument does not work when + for evaluation, True by default. This argument does not work when gt_difficult is None. ap_version (string): The average precision calculation ways, it must be 'integral' or '11point'. Please check diff --git a/python/paddle/fluid/tests/unittests/dist_transformer.py b/python/paddle/fluid/tests/unittests/dist_transformer.py index 27c67edf4f62dd3c5d396826348f8da4513667ba..b8d83323600a7d9ca437ceeafd95fef74bf4f056 100644 --- a/python/paddle/fluid/tests/unittests/dist_transformer.py +++ b/python/paddle/fluid/tests/unittests/dist_transformer.py @@ -1563,7 +1563,7 @@ def fast_decode( } for cache in caches] pre_pos = layers.elementwise_mul( x=layers.fill_constant_batch_size_like( - input=pre_enc_output, # cann't use pre_ids here since it has lod + input=pre_enc_output, # can't use pre_ids here since it has lod value=1, shape=[-1, 1, 1], dtype=pre_ids.dtype), diff --git a/python/paddle/fluid/tests/unittests/transformer_model.py b/python/paddle/fluid/tests/unittests/transformer_model.py index 905b7d6fe75ab0080e3e97fbd4710ad913a05a38..d59f9da4a94a81e9403ffe153f19c7aee2762bc8 100644 --- a/python/paddle/fluid/tests/unittests/transformer_model.py +++ b/python/paddle/fluid/tests/unittests/transformer_model.py @@ -136,7 +136,7 @@ def multi_head_attention(queries, # The current implementation of softmax_op only supports 2D tensor, # consequently it cannot be directly used here. # If to use the reshape_op, Besides, the shape of product inferred in - # compile-time is not the actual shape in run-time. It cann't be used + # compile-time is not the actual shape in run-time. It can't be used # to set the attribute of reshape_op. # So, here define the softmax for temporary solution.