From 046550ce7985fe56db260edf956f8b199da8e44d Mon Sep 17 00:00:00 2001 From: wanglezz <2655541965@qq.com> Date: Sat, 8 Nov 2025 17:32:15 +0800 Subject: [PATCH 1/3] fix typo F-[3-13] --- _typos.toml | 12 ------------ docs/api/paddle/distributed/fleet/Fleet_cn.rst | 4 ++-- .../xpu/resnet_block/ResNetBasicBlock_cn.rst | 2 +- docs/api/paddle/nn/GRU_cn.rst | 2 +- docs/api/paddle/nn/LSTM_cn.rst | 2 +- docs/api/paddle/nn/SimpleRNN_cn.rst | 2 +- docs/api/paddle/static/nn/batch_norm_cn.rst | 2 +- docs/api/paddle/static/nn/conv3d_cn.rst | 2 +- docs/design/concepts/tensor_array.md | 2 +- docs/design/concurrent/channel.md | 2 +- docs/design/mkldnn/inplace/inplace.md | 2 +- docs/design/modules/prune.md | 2 +- .../api_docs_guidelines_cn.md | 4 ++-- .../custom_device_docs/runtime_data_type_en.md | 2 +- docs/dev_guides/git_guides/local_dev_guide_en.md | 2 +- docs/guides/advanced/customize_cn.ipynb | 2 +- docs/guides/advanced/visualdl_usage_en.md | 2 +- docs/guides/custom_op/new_python_op_cn.md | 2 +- .../torch.Tensor.requires_grad_.md | 2 +- .../torch.nn.functional.softmin.md | 2 +- 20 files changed, 21 insertions(+), 33 deletions(-) diff --git a/_typos.toml b/_typos.toml index ec74897c8b6..5e3067a5e51 100644 --- a/_typos.toml +++ b/_typos.toml @@ -47,18 +47,6 @@ dimention = "dimention" dimentions = "dimentions" dirrectories = "dirrectories" disucssion = "disucssion" -feeded = "feeded" -flaot = "flaot" -fliters = "fliters" -follwing = "follwing" -formated = "formated" -formater = "formater" -forword = "forword" -foward = "foward" -functinal = "functinal" -fundemental = "fundemental" -funtion = "funtion" -ilter = "ilter" inferface = "inferface" infor = "infor" instert = "instert" diff --git a/docs/api/paddle/distributed/fleet/Fleet_cn.rst b/docs/api/paddle/distributed/fleet/Fleet_cn.rst index a2db6cd6473..91970b26bf6 100644 --- a/docs/api/paddle/distributed/fleet/Fleet_cn.rst +++ b/docs/api/paddle/distributed/fleet/Fleet_cn.rst @@ -262,7 +262,7 @@ stop_worker() COPY-FROM: paddle.distributed.fleet.Fleet.stop_worker -save_inference_model(executor, dirname, feeded_var_names, target_vars, main_program=None, export_for_deployment=True) +save_inference_model(executor, dirname, fed_var_names, target_vars, main_program=None, export_for_deployment=True) ''''''''' 修剪指定的 ``main_program`` 以构建一个专门用于预测的 ``Inference Program`` ( ``Program`` 含义详见 :ref:`api_guide_Program` )。所得到的 ``Inference Program`` 及其对应的所>有相关参数均被保存到 ``dirname`` 指定的目录中。 @@ -272,7 +272,7 @@ save_inference_model(executor, dirname, feeded_var_names, target_vars, main_prog - **executor** (Executor) – 用于保存预测模型的 ``executor``,详见 :ref:`api_guide_executor` 。 - **dirname** (str) – 指定保存预测模型结构和参数的文件目录。 - - **feeded_var_names** (list[str]) – 字符串列表,包含着 Inference Program 预测时所需提供数据的所有变量名称(即所有输入变量的名称)。 + - **fed_var_names** (list[str]) – 字符串列表,包含着 Inference Program 预测时所需提供数据的所有变量名称(即所有输入变量的名称)。 - **target_vars** (list[Tensor]) – ``Tensor`` (详见 :ref:`api_guide_Program` )类型列表,包含着模型的所有输出变量。通过这些输出变量即可得到模型的预测结果。 - **main_program** (Program,可选) – 通过该参数指定的 ``main_program`` 可构建一个专门用于预测的 ``Inference Program``。若为 None,则使用全局默认的 ``_main_program_`` 。>默认值为 None。 - **export_for_deployment** (bool,可选) – 若为 True,则 ``main_program`` 指定的 Program 将被修改为只支持直接预测部署的 Program。否则,将存储更多的信息,方便优化和再训练。目前 diff --git a/docs/api/paddle/incubate/xpu/resnet_block/ResNetBasicBlock_cn.rst b/docs/api/paddle/incubate/xpu/resnet_block/ResNetBasicBlock_cn.rst index a4cc5c78748..3330a2496bd 100644 --- a/docs/api/paddle/incubate/xpu/resnet_block/ResNetBasicBlock_cn.rst +++ b/docs/api/paddle/incubate/xpu/resnet_block/ResNetBasicBlock_cn.rst @@ -2,7 +2,7 @@ ResNetBasicBlock ------------------------------- -.. py:class:: paddle.incubate.xpu.resnet_block.ResNetBasicBlock(num_channels1, num_filter1, filter1_size, num_channels2, num_filter2, filter2_size, num_channels3, num_filter3, filter3_size, stride1=1, stride2=1, stride3=1, act='relu', momentum=0.9, eps=1e-5, data_format='NCHW', has_shortcut=False, use_global_stats=False, is_test=False, filter1_attr=None, scale1_attr=None, bias1_attr=None, moving_mean1_name=None, moving_var1_name=None, filter2_attr=None, scale2_attr=None, bias2_attr=None, moving_mean2_name=None, moving_var2_name=None, ilter3_attr=None, scale3_attr=None, bias3_attr=None, moving_mean3_name=None, moving_var3_name=None, padding1=0, padding2=0, padding3=0, dilation1=1, dilation2=1, dilation3=1, trainable_statistics=False, find_conv_max=True) +.. py:class:: paddle.incubate.xpu.resnet_block.ResNetBasicBlock(num_channels1, num_filter1, filter1_size, num_channels2, num_filter2, filter2_size, num_channels3, num_filter3, filter3_size, stride1=1, stride2=1, stride3=1, act='relu', momentum=0.9, eps=1e-5, data_format='NCHW', has_shortcut=False, use_global_stats=False, is_test=False, filter1_attr=None, scale1_attr=None, bias1_attr=None, moving_mean1_name=None, moving_var1_name=None, filter2_attr=None, scale2_attr=None, bias2_attr=None, moving_mean2_name=None, moving_var2_name=None, filter3_attr=None, scale3_attr=None, bias3_attr=None, moving_mean3_name=None, moving_var3_name=None, padding1=0, padding2=0, padding3=0, dilation1=1, dilation2=1, dilation3=1, trainable_statistics=False, find_conv_max=True) 该接口用于构建 ``ResNetBasicBlock`` 类的一个可调用对象,实现一次性计算多个 ``Conv2D``、 ``BatchNorm`` 和 ``ReLU`` 的功能,排列顺序参见源码链接。 diff --git a/docs/api/paddle/nn/GRU_cn.rst b/docs/api/paddle/nn/GRU_cn.rst index c19d6981e97..1f5bbb53314 100644 --- a/docs/api/paddle/nn/GRU_cn.rst +++ b/docs/api/paddle/nn/GRU_cn.rst @@ -35,7 +35,7 @@ GRU - **input_size** (int) - 输入 :math:`x` 的大小。 - **hidden_size** (int) - 隐藏状态 :math:`h` 大小。 - **num_layers** (int,可选) - 循环网络的层数。例如,将层数设为 2,会将两层 GRU 网络堆叠在一起,第二层的输入来自第一层的输出。默认为 1。 - - **direction** (str,可选) - 网络迭代方向,可设置为 forward 或 bidirect(或 bidirectional)。foward 指从序列开始到序列结束的单向 GRU 网络方向,bidirectional 指从序列开始到序列结束,又从序列结束到开始的双向 GRU 网络方向。默认为 forward。 + - **direction** (str,可选) - 网络迭代方向,可设置为 forward 或 bidirect(或 bidirectional)。forward 指从序列开始到序列结束的单向 GRU 网络方向,bidirectional 指从序列开始到序列结束,又从序列结束到开始的双向 GRU 网络方向。默认为 forward。 - **time_major** (bool,可选) - 指定 input 的第一个维度是否是 time steps。如果 time_major 为 True,则 Tensor 的形状为[time_steps,batch_size,input_size],否则为[batch_size,time_steps,input_size]。`time_steps` 指输入序列的长度。默认为 False。 - **dropout** (float,可选) - dropout 概率,指的是出第一层外每层输入时的 dropout 概率。范围为[0, 1]。默认为 0。 - **weight_ih_attr** (ParamAttr,可选) - weight_ih 的参数。默认为 None。 diff --git a/docs/api/paddle/nn/LSTM_cn.rst b/docs/api/paddle/nn/LSTM_cn.rst index 063735377f1..3f98095b7a2 100644 --- a/docs/api/paddle/nn/LSTM_cn.rst +++ b/docs/api/paddle/nn/LSTM_cn.rst @@ -43,7 +43,7 @@ LSTM - **input_size** (int) - 输入 :math:`x` 的大小。 - **hidden_size** (int) - 隐藏状态 :math:`h` 大小。 - **num_layers** (int,可选) - 循环网络的层数。例如,将层数设为 2,会将两层 GRU 网络堆叠在一起,第二层的输入来自第一层的输出。默认为 1。 - - **direction** (str,可选) - 网络迭代方向,可设置为 forward 或 bidirect(或 bidirectional)。foward 指从序列开始到序列结束的单向 GRU 网络方向,bidirectional 指从序列开始到序列结束,又从序列结束到开始的双向 GRU 网络方向。默认为 forward。 + - **direction** (str,可选) - 网络迭代方向,可设置为 forward 或 bidirect(或 bidirectional)。forward 指从序列开始到序列结束的单向 GRU 网络方向,bidirectional 指从序列开始到序列结束,又从序列结束到开始的双向 GRU 网络方向。默认为 forward。 - **time_major** (bool,可选) - 指定 input 的第一个维度是否是 time steps。如果 time_major 为 True,则 Tensor 的形状为[time_steps, batch_size, input_size],否则为[batch_size, time_steps, input_size]。`time_steps` 指输入序列的长度。默认为 False。 - **dropout** (float,可选) - dropout 概率,指的是除第一层外每层输入时的 dropout 概率。范围为[0, 1]。默认为 0。 - **weight_ih_attr** (ParamAttr,可选) - weight_ih 的参数。默认为 None。 diff --git a/docs/api/paddle/nn/SimpleRNN_cn.rst b/docs/api/paddle/nn/SimpleRNN_cn.rst index dfb3b5544ea..4450365f560 100644 --- a/docs/api/paddle/nn/SimpleRNN_cn.rst +++ b/docs/api/paddle/nn/SimpleRNN_cn.rst @@ -25,7 +25,7 @@ SimpleRNN - **input_size** (int) - 输入 :math:`x` 的大小。 - **hidden_size** (int) - 隐藏状态 :math:`h` 大小。 - **num_layers** (int,可选) - 循环网络的层数。例如,将层数设为 2,会将两层 GRU 网络堆叠在一起,第二层的输入来自第一层的输出。默认为 1。 - - **direction** (str,可选) - 网络迭代方向,可设置为 forward 或 bidirect(或 bidirectional)。foward 指从序列开始到序列结束的单向 GRU 网络方向,bidirectional 指从序列开始到序列结束,又从序列结束到开始的双向 GRU 网络方向。默认为 forward。 + - **direction** (str,可选) - 网络迭代方向,可设置为 forward 或 bidirect(或 bidirectional)。forward 指从序列开始到序列结束的单向 GRU 网络方向,bidirectional 指从序列开始到序列结束,又从序列结束到开始的双向 GRU 网络方向。默认为 forward。 - **time_major** (bool,可选) - 指定 input 的第一个维度是否是 time steps。如果 time_major 为 True,则 Tensor 的形状为[time_steps,batch_size,input_size],否则为[batch_size,time_steps,input_size]。`time_steps` 指输入序列的长度。默认为 False。 - **dropout** (float,可选) - dropout 概率,指的是出第一层外每层输入时的 dropout 概率。范围为[0, 1]。默认为 0。 - **activation** (str,可选) - 网络中每个单元的激活函数。可以是 tanh 或 relu。默认为 tanh。 diff --git a/docs/api/paddle/static/nn/batch_norm_cn.rst b/docs/api/paddle/static/nn/batch_norm_cn.rst index b6a464ad3fe..1f60f79c0ff 100644 --- a/docs/api/paddle/static/nn/batch_norm_cn.rst +++ b/docs/api/paddle/static/nn/batch_norm_cn.rst @@ -48,7 +48,7 @@ moving_mean 和 moving_var 是训练过程中统计得到的全局均值和方 参数 :::::::::::: - - **input** (Tensor) - batch_norm 算子的输入特征,是一个 Tensor 类型,输入维度可以是 2, 3, 4, 5。数据类型:flaot16, float32, float64。 + - **input** (Tensor) - batch_norm 算子的输入特征,是一个 Tensor 类型,输入维度可以是 2, 3, 4, 5。数据类型:float16, float32, float64。 - **act** (string)- 激活函数类型,可以是 leaky_realu、relu、prelu 等。默认:None。 - **is_test** (bool) - 指示它是否在测试阶段,非训练阶段使用训练过程中统计到的全局均值和全局方差。默认:False。 - **momentum** (float|Tensor)- 此值用于计算 moving_mean 和 moving_var,是一个 float 类型或者一个 shape 为[1],数据类型为 float32 的 Tensor 类型。更新公式为::math:`moving\_mean = moving\_mean * momentum + new\_mean * (1. - momentum)` , :math:`moving\_var = moving\_var * momentum + new\_var * (1. - momentum)`,默认:0.9。 diff --git a/docs/api/paddle/static/nn/conv3d_cn.rst b/docs/api/paddle/static/nn/conv3d_cn.rst index 8a5b143bc95..210a574a760 100644 --- a/docs/api/paddle/static/nn/conv3d_cn.rst +++ b/docs/api/paddle/static/nn/conv3d_cn.rst @@ -76,7 +76,7 @@ conv3d :::::::::::: - **input** (Tensor) - 形状为 :math:`[N, C, D, H, W]` 或 :math:`[N, D, H, W, C]` 的 5-D Tensor,N 是批尺寸,C 是通道数,D 是特征深度,H 是特征高度,W 是特征宽度,数据类型为 float16, float32 或 float64。 - - **num_fliters** (int) - 滤波器(卷积核)的个数。和输出图像通道相同。 + - **num_filters** (int) - 滤波器(卷积核)的个数。和输出图像通道相同。 - **filter_size** (int|list|tuple) - 滤波器大小。如果它是一个列表或元组,则必须包含三个整数值:(filter_size_depth, filter_size_height,filter_size_width)。若为一个整数,则 filter_size_depth = filter_size_height = filter_size_width = filter_size。 - **stride** (int|list|tuple,可选) - 步长大小。滤波器和输入进行卷积计算时滑动的步长。如果它是一个列表或元组,则必须包含三个整型数:(stride_depth, stride_height, stride_width)。若为一个整数,stride_depth = stride_height = stride_width = stride。默认值:1。 - **padding** (int|list|tuple|str,可选) - 填充大小。如果它是一个字符串,可以是"VALID"或者"SAME",表示填充算法,计算细节可参考上述 ``padding`` = "SAME"或 ``padding`` = "VALID" 时的计算公式。如果它是一个元组或列表,它可以有 3 种格式: diff --git a/docs/design/concepts/tensor_array.md b/docs/design/concepts/tensor_array.md index bed7ba9eb42..4fc3585d233 100644 --- a/docs/design/concepts/tensor_array.md +++ b/docs/design/concepts/tensor_array.md @@ -218,7 +218,7 @@ Since each step of RNN can only take a tensor-represented batch of data as input some preprocess should be taken on the inputs such as sorting the sentences by their length in descending order and cut each word and pack to new batches. Such cut-like operations can be embedded into `TensorArray` as general methods called `unpack` and `pack`, -these two operations are similar to `stack` and `unstack` except that they operate on variable-length sequences formated as a LoD tensor rather than a tensor. +these two operations are similar to `stack` and `unstack` except that they operate on variable-length sequences formatted as a LoD tensor rather than a tensor. Some definitions are like diff --git a/docs/design/concurrent/channel.md b/docs/design/concurrent/channel.md index 97235d66fa7..14967929b0c 100644 --- a/docs/design/concurrent/channel.md +++ b/docs/design/concurrent/channel.md @@ -3,7 +3,7 @@ ## Introduction A Channel is a data structure that allows for synchronous interprocess -communication via message passing. It is a fundemental component of CSP +communication via message passing. It is a fundamental component of CSP (communicating sequential processes), and allows for users to pass data between threads without having to worry about synchronization. diff --git a/docs/design/mkldnn/inplace/inplace.md b/docs/design/mkldnn/inplace/inplace.md index 10967c26de4..529a2174f32 100644 --- a/docs/design/mkldnn/inplace/inplace.md +++ b/docs/design/mkldnn/inplace/inplace.md @@ -56,7 +56,7 @@ Pattern is restricted so that in-placed to be op is of oneDNN type. Due to fact more than one input and their output may be consumed by more than one operator it is expected that pattern maybe detected multiple times for the same operator e.g. once for one input, then for second input etc.. -Just having oneDNN operator capable of in-place is not enough to have in-place execution enabled, hence follwing rules +Just having oneDNN operator capable of in-place is not enough to have in-place execution enabled, hence following rules are checked by oneDNN in-place pass: 1. If input node to in-place operator is also an input to different operator, then in-place computation cannot be performed, as there is a risk that other operator consuming in-placed op operator will be executed after in-placed operator and therefore get invalid input data (overwritten by in-place computation). 2. If after in-placed operator there is another operator that is reusing in-place op's input var then in-place cannot happen unless next op can perform in-place computation. Next picture presents the idea. diff --git a/docs/design/modules/prune.md b/docs/design/modules/prune.md index 88928565d36..8d295087ecc 100644 --- a/docs/design/modules/prune.md +++ b/docs/design/modules/prune.md @@ -12,7 +12,7 @@ Pruning need to support both variables and operators being evaluation targets. C different situations. ```python -# Case 1: run foward pass. +# Case 1: run forward pass. cost_np = session.run(target=cost) # Case 2: run backward passing. opts_np, _ = session.run(target=[cost, opt]) diff --git a/docs/dev_guides/api_contributing_guides/api_docs_guidelines_cn.md b/docs/dev_guides/api_contributing_guides/api_docs_guidelines_cn.md index e0fbcd9c24c..634d7fbcc25 100644 --- a/docs/dev_guides/api_contributing_guides/api_docs_guidelines_cn.md +++ b/docs/dev_guides/api_contributing_guides/api_docs_guidelines_cn.md @@ -225,9 +225,9 @@ API 参数部分,要解释清楚每个参数的意义和使用场景。需要 可以看出,第二行的 `return_numpy` 的描述更为清晰,分别描述了 True 和 False 的两种情况。而第一行的说明过于简单。 -**2、** 在讲清楚每个 API 参数是什么的同时,还需要描述清楚每个参数的具体作用是什么。如再如 `feeded_var_names`: +**2、** 在讲清楚每个 API 参数是什么的同时,还需要描述清楚每个参数的具体作用是什么。如再如 `fed_var_names`: - feeded_var_names (list[str]) – 字符串列表,包含着 Inference Program 预测时所需提供数据的所有变量名称(即所有输入变量的名称)。 + fed_var_names (list[str]) – 字符串列表,包含着 Inference Program 预测时所需提供数据的所有变量名称(即所有输入变量的名称)。 target_vars (list[Variable]) – Variable (详见 基础概念 )类型列表,包含着模型的所有输出变量。通过这些输出变量即可得到模型的预测结果。 用户看了描述以后,完全不知道这两个参数可以用来做**网络裁剪**,所以需要将一些参数的功能作用描述出来。 diff --git a/docs/dev_guides/custom_device_docs/runtime_data_type_en.md b/docs/dev_guides/custom_device_docs/runtime_data_type_en.md index d9c1e708385..30d1c2ddd03 100644 --- a/docs/dev_guides/custom_device_docs/runtime_data_type_en.md +++ b/docs/dev_guides/custom_device_docs/runtime_data_type_en.md @@ -18,7 +18,7 @@ typedef enum { C_SUCCESS - The returned value when the execution of the function is a success -C_WARNING - The returned value when the performance of the funtion falls short of expectations. For example, the asynchronous API is actually synchronous. +C_WARNING - The returned value when the performance of the function falls short of expectations. For example, the asynchronous API is actually synchronous. C_FAILED - Resources runs out or the request fails. diff --git a/docs/dev_guides/git_guides/local_dev_guide_en.md b/docs/dev_guides/git_guides/local_dev_guide_en.md index 84f7e30c397..ff00eeff309 100644 --- a/docs/dev_guides/git_guides/local_dev_guide_en.md +++ b/docs/dev_guides/git_guides/local_dev_guide_en.md @@ -121,7 +121,7 @@ Check for merge conflicts................................................Passed Check for broken symlinks................................................Passed Detect Private Key...................................(no files to check)Skipped Fix End of Files.....................................(no files to check)Skipped -clang-formater.......................................(no files to check)Skipped +clang-formatter.......................................(no files to check)Skipped [my-cool-stuff c703c041] add test file 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 233 diff --git a/docs/guides/advanced/customize_cn.ipynb b/docs/guides/advanced/customize_cn.ipynb index 1effac02b91..5e9f303f5b5 100644 --- a/docs/guides/advanced/customize_cn.ipynb +++ b/docs/guides/advanced/customize_cn.ipynb @@ -57,7 +57,7 @@ " - label:单个或批次训练数据对应的标签数据\n", " 接口返回值是一个Tensor,根据需要将所有x和label计算得到的loss值求和或取均值\n", " \"\"\"\n", - " # 返回forword中计算的结果\n", + " # 返回forward中计算的结果\n", " # output = xxxxx\n", " # return output" ] diff --git a/docs/guides/advanced/visualdl_usage_en.md b/docs/guides/advanced/visualdl_usage_en.md index fa8cc29a062..6b0b24e7b9b 100755 --- a/docs/guides/advanced/visualdl_usage_en.md +++ b/docs/guides/advanced/visualdl_usage_en.md @@ -614,7 +614,7 @@ exe.run(fluid.default_startup_program()) # save the result to "./paddle_lenet_5_model" fluid.io.save_inference_model( "./paddle_lenet_5_model", - feeded_var_names=[image.name], + fed_var_names=[image.name], target_vars=[predition], executor=exe) ``` diff --git a/docs/guides/custom_op/new_python_op_cn.md b/docs/guides/custom_op/new_python_op_cn.md index 481b44b6346..ab5dddfd396 100644 --- a/docs/guides/custom_op/new_python_op_cn.md +++ b/docs/guides/custom_op/new_python_op_cn.md @@ -243,7 +243,7 @@ def py_func(func, x, out, backward_func=None, skip_vars_in_backward_input=None): 若前向函数的输入为 `x_1`, `x_2`, ..., `x_n` ,输出为`y_1`, `y_2`, ..., `y_m`,则前向函数的定义格式为: ```Python -def foward_func(x_1, x_2, ..., x_n): +def forward_func(x_1, x_2, ..., x_n): ... return y_1, y_2, ..., y_m ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.requires_grad_.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.requires_grad_.md index 83d410edb81..6317ae542d2 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.requires_grad_.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.Tensor.requires_grad_.md @@ -9,7 +9,7 @@ torch.Tensor.requires_grad_(requires_grad=True) paddle.Tensor.stop_gradient = False ``` -两者功能一致,torch 为 funtion 调用方式,paddle 为 attribution 赋值方式,具体如下: +两者功能一致,torch 为 function 调用方式,paddle 为 attribution 赋值方式,具体如下: ### 参数映射 | PyTorch | PaddlePaddle | 备注 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.functional.softmin.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.functional.softmin.md index 905a9bf86e2..6db32bb56aa 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.functional.softmin.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/composite_implement/torch.nn.functional.softmin.md @@ -12,5 +12,5 @@ Paddle 无此 API,需要组合实现。 torch.nn.functional.softmin(input, dim=1) # Paddle 写法 -paddle.nn.functinal.softmax(-input, axis=1) +paddle.nn.functional.softmax(-input, axis=1) ``` From c44aff82a0af68b2ea28c72cc496a96102b762d9 Mon Sep 17 00:00:00 2001 From: wanglezz <2655541965@qq.com> Date: Tue, 11 Nov 2025 14:11:18 +0800 Subject: [PATCH 2/3] add specific words feeded --- _typos.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/_typos.toml b/_typos.toml index 5e3067a5e51..4318e3d5ae8 100644 --- a/_typos.toml +++ b/_typos.toml @@ -25,6 +25,7 @@ arange = "arange" unsupport = "unsupport" Nervana = "Nervana" datas = "datas" +feeded = "feeded" # These words need to be fixed Creenshot = "Creenshot" From 1aba3f7c3c0dd23a693c77e40d157a04cbe8f71d Mon Sep 17 00:00:00 2001 From: wanglezz <2655541965@qq.com> Date: Tue, 11 Nov 2025 14:30:41 +0800 Subject: [PATCH 3/3] restore change to feeded --- docs/api/paddle/distributed/fleet/Fleet_cn.rst | 4 ++-- .../api_contributing_guides/api_docs_guidelines_cn.md | 4 ++-- docs/guides/advanced/visualdl_usage_en.md | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/api/paddle/distributed/fleet/Fleet_cn.rst b/docs/api/paddle/distributed/fleet/Fleet_cn.rst index 91970b26bf6..a2db6cd6473 100644 --- a/docs/api/paddle/distributed/fleet/Fleet_cn.rst +++ b/docs/api/paddle/distributed/fleet/Fleet_cn.rst @@ -262,7 +262,7 @@ stop_worker() COPY-FROM: paddle.distributed.fleet.Fleet.stop_worker -save_inference_model(executor, dirname, fed_var_names, target_vars, main_program=None, export_for_deployment=True) +save_inference_model(executor, dirname, feeded_var_names, target_vars, main_program=None, export_for_deployment=True) ''''''''' 修剪指定的 ``main_program`` 以构建一个专门用于预测的 ``Inference Program`` ( ``Program`` 含义详见 :ref:`api_guide_Program` )。所得到的 ``Inference Program`` 及其对应的所>有相关参数均被保存到 ``dirname`` 指定的目录中。 @@ -272,7 +272,7 @@ save_inference_model(executor, dirname, fed_var_names, target_vars, main_program - **executor** (Executor) – 用于保存预测模型的 ``executor``,详见 :ref:`api_guide_executor` 。 - **dirname** (str) – 指定保存预测模型结构和参数的文件目录。 - - **fed_var_names** (list[str]) – 字符串列表,包含着 Inference Program 预测时所需提供数据的所有变量名称(即所有输入变量的名称)。 + - **feeded_var_names** (list[str]) – 字符串列表,包含着 Inference Program 预测时所需提供数据的所有变量名称(即所有输入变量的名称)。 - **target_vars** (list[Tensor]) – ``Tensor`` (详见 :ref:`api_guide_Program` )类型列表,包含着模型的所有输出变量。通过这些输出变量即可得到模型的预测结果。 - **main_program** (Program,可选) – 通过该参数指定的 ``main_program`` 可构建一个专门用于预测的 ``Inference Program``。若为 None,则使用全局默认的 ``_main_program_`` 。>默认值为 None。 - **export_for_deployment** (bool,可选) – 若为 True,则 ``main_program`` 指定的 Program 将被修改为只支持直接预测部署的 Program。否则,将存储更多的信息,方便优化和再训练。目前 diff --git a/docs/dev_guides/api_contributing_guides/api_docs_guidelines_cn.md b/docs/dev_guides/api_contributing_guides/api_docs_guidelines_cn.md index 634d7fbcc25..e0fbcd9c24c 100644 --- a/docs/dev_guides/api_contributing_guides/api_docs_guidelines_cn.md +++ b/docs/dev_guides/api_contributing_guides/api_docs_guidelines_cn.md @@ -225,9 +225,9 @@ API 参数部分,要解释清楚每个参数的意义和使用场景。需要 可以看出,第二行的 `return_numpy` 的描述更为清晰,分别描述了 True 和 False 的两种情况。而第一行的说明过于简单。 -**2、** 在讲清楚每个 API 参数是什么的同时,还需要描述清楚每个参数的具体作用是什么。如再如 `fed_var_names`: +**2、** 在讲清楚每个 API 参数是什么的同时,还需要描述清楚每个参数的具体作用是什么。如再如 `feeded_var_names`: - fed_var_names (list[str]) – 字符串列表,包含着 Inference Program 预测时所需提供数据的所有变量名称(即所有输入变量的名称)。 + feeded_var_names (list[str]) – 字符串列表,包含着 Inference Program 预测时所需提供数据的所有变量名称(即所有输入变量的名称)。 target_vars (list[Variable]) – Variable (详见 基础概念 )类型列表,包含着模型的所有输出变量。通过这些输出变量即可得到模型的预测结果。 用户看了描述以后,完全不知道这两个参数可以用来做**网络裁剪**,所以需要将一些参数的功能作用描述出来。 diff --git a/docs/guides/advanced/visualdl_usage_en.md b/docs/guides/advanced/visualdl_usage_en.md index 6b0b24e7b9b..fa8cc29a062 100755 --- a/docs/guides/advanced/visualdl_usage_en.md +++ b/docs/guides/advanced/visualdl_usage_en.md @@ -614,7 +614,7 @@ exe.run(fluid.default_startup_program()) # save the result to "./paddle_lenet_5_model" fluid.io.save_inference_model( "./paddle_lenet_5_model", - fed_var_names=[image.name], + feeded_var_names=[image.name], target_vars=[predition], executor=exe) ```