diff --git a/docs/lite/docs/source_en/mindir/runtime_python.md b/docs/lite/docs/source_en/mindir/runtime_python.md index afc100e52e4c533b74bacf94a3598253c60c968c..6432b1344238d15905cc3bcce2b10b9165836d9c 100644 --- a/docs/lite/docs/source_en/mindir/runtime_python.md +++ b/docs/lite/docs/source_en/mindir/runtime_python.md @@ -169,13 +169,31 @@ MindSpore Lite inference supports dynamic weight updates on the Ascend backend. ### Creating Config File -Write all tensor names corresponding to the Matmul operators that need to be updated into a text file, with each tensor name occupying one line. Build a model to load the configuration file, set the configuration file, and the content of the configuration file `config.ini` is as follows: +Write the weight names, weight shapes, and operator names corresponding to the operators that need to be updated into a text file. Build a model to load the configuration file, set the configuration file, and the content of the configuration file `config.ini` is as follows: ```text [ascend_context] variable_weights_file="update_weight_name_list.txt" ``` +The content format of update_weight_name_list.txt is as follows: + +```text +weight_name:weight_shape;node_name +weight_name1:weight_shape1;node_name1 +weight_name2:weight_shape2;node_name2 +...... +``` + +For example: + +```text +matmul.weight:512,512;/Matmul +matmul2.weight:512,512;/Matmul2 +matmul3.weight:512,512;/Matmul3 +...... +``` + ### Model Loading and Compilation ```python diff --git a/docs/lite/docs/source_en/reference/operator_list_lite.md b/docs/lite/docs/source_en/reference/operator_list_lite.md index d0a0a1af0720ffa29f3495e2dd206e6e620fa916..cb2b943d5a4bcd51b2042979c143fb586666a963 100644 --- a/docs/lite/docs/source_en/reference/operator_list_lite.md +++ b/docs/lite/docs/source_en/reference/operator_list_lite.md @@ -108,7 +108,7 @@ | MaximumGrad | Calculate the gradient of the maximum value function | FP16
FP32 | - | - | | | MaxPoolFusion | Maximum pooling | FP16
FP32
Int8
UInt8 | FP16 | FP16
FP32 | FP16 | | MaxPoolGrad | Compute the gradients for the max-pooling layer | FP16
FP32 | - | - | | -| Merge | Create a new tensor with the exact same shape as the input tensor X, but with all element values set to 1. | FP16
FP32 | - | - | | +| Merge | Retrieve and output the first available tensor from a set of input tensors. | FP16
FP32 | - | - | | | Minimum | Find the minimum value at the element level | FP16
FP32
Int32 | FP16 | FP16
FP32 | FP16 | | MinimumGrad | Compute the gradient of the minimum value function | FP16
FP32 | - | - | | | Mod | Return the remainder of the division operation | FP32
Int32 | - | - | FP16 | diff --git a/docs/lite/docs/source_zh_cn/mindir/runtime_python.md b/docs/lite/docs/source_zh_cn/mindir/runtime_python.md index 52f660d48fe1a16510312ddd4a707e11cc202061..0cd116ec2a0ade60d4116f0c78d8e04f1a844086 100644 --- a/docs/lite/docs/source_zh_cn/mindir/runtime_python.md +++ b/docs/lite/docs/source_zh_cn/mindir/runtime_python.md @@ -169,13 +169,31 @@ MindSpore Lite推理,在Ascend后端上支持动态权重更新,使用步骤 ### 创建配置文件 -将需要更新的Matmul算子所对应的Tensor名称全部写入一个文本文件中,每个Tensor名字占一行。构建模型加载配置文件,配置文件设置,配置文件`config.ini`内容如下所示: +将需要更新的算子所对应的权重名称、权重形状、算子名称全部写入一个文本文档。构建模型加载配置文件,配置文件设置,配置文件`config.ini`内容如下所示: ```text [ascend_context] variable_weights_file="update_weight_name_list.txt" ``` +update_weight_name_list.txt内容格式如下: + +```text +weight_name:weight_shape;node_name +weight_name1:weight_shape1;node_name1 +weight_name2:weight_shape2;node_name2 +...... +``` + +比如: + +```text +matmul.weight:512,512;/Matmul +matmul2.weight:512,512;/Matmul2 +matmul3.weight:512,512;/Matmul3 +...... +``` + ### 模型加载 ```python diff --git a/docs/lite/docs/source_zh_cn/reference/operator_list_lite.md b/docs/lite/docs/source_zh_cn/reference/operator_list_lite.md index 135dca111776b7196d23fbe5c968d13cb1a93167..2cf75f51254e26be8c93c7602830e99ec1739aaf 100644 --- a/docs/lite/docs/source_zh_cn/reference/operator_list_lite.md +++ b/docs/lite/docs/source_zh_cn/reference/operator_list_lite.md @@ -108,7 +108,7 @@ | MaximumGrad | 计算最大值函数的梯度 | FP16
FP32 | - | - | | | MaxPoolFusion | 最大池化 | FP16
FP32
Int8
UInt8 | FP16 | FP16
FP32 | FP16 | | MaxPoolGrad | 计算最大池化层的梯度 | FP16
FP32 | - | - | | -| Merge | 创建一个与输入张量X形状完全相同但所有元素值均为1的新张量 | FP16
FP32 | - | - | | +| Merge | 从一组输入张量中获取第一个可用的张量并输出 | FP16
FP32 | - | - | | | Minimum | 取元素级最小值 | FP16
FP32
Int32 | FP16 | FP16
FP32 | FP16 | | MinimumGrad | 计算最小值函数的梯度 | FP16
FP32 | - | - | | | Mod | 返回除法元素的余数 | FP32
Int32 | - | - | FP16 |