提交 3ae75151 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!866 modify codes formats in quantization tutorials for master

Merge pull request !866 from lvmingfu/master
......@@ -82,10 +82,10 @@ Next, the LeNet network is used as an example to describe steps 3 and 6.
Define a fusion network and replace the specified operators.
1. Use the `nn.Conv2dBnAct` operator to replace the two operators `nn.Conv2d` and `nn.Relu` in the original network model.
2. Use the `nn.DenseBnAct` operator to replace the two operators `nn.Dense` and `nn.Relu` in the original network model.
1. Use the `nn.Conv2dBnAct` operator to replace the two operators `nn.Conv2d` and `nn.ReLU` in the original network model.
2. Use the `nn.DenseBnAct` operator to replace the two operators `nn.Dense` and `nn.ReLU` in the original network model.
> Even if the `nn.Dense` and `nn.Conv2d` operators are not followed by `nn.Batchnorm` and `nn.Relu`, the preceding two replacement operations must be performed as required.
> Even if the `nn.Dense` and `nn.Conv2d` operators are not followed by `nn.BatchNorm*` and `nn.ReLU`, the preceding two replacement operations must be performed as required.
The definition of the original network model LeNet5 is as follows:
......
......@@ -82,10 +82,10 @@ MindSpore的感知量化训练是在训练基础上,使用低精度数据替
定义融合网络,在定义网络后,替换指定的算子。
1. 使用`nn.Conv2dBnAct`算子替换原网络模型中的2个算子`nn.Conv2d``nn.Relu`
2. 使用`nn.DenseBnAct`算子替换原网络模型中的2个算子`nn.Dense``nn.Relu`
1. 使用`nn.Conv2dBnAct`算子替换原网络模型中的2个算子`nn.Conv2d``nn.ReLU`
2. 使用`nn.DenseBnAct`算子替换原网络模型中的2个算子`nn.Dense``nn.ReLU`
> 无论`nn.Dense`和`nn.Conv2d`算子后面有没有`nn.BatchNorm`和`nn.Relu`,都要按规定使用上述两个算子进行融合替换。
> 无论`nn.Dense`和`nn.Conv2d`算子后面有没有`nn.BatchNorm*`和`nn.ReLU`,都要按规定使用上述两个算子进行融合替换。
原网络模型LeNet5的定义如下所示:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册