@@ -190,76 +190,41 @@ The LeNet network is relatively simple. In addition to the input layer, the LeNe
> For details about the LeNet network, visit <http://yann.lecun.com/exdb/lenet/>.
You need to initialize the full connection layers and convolutional layers.
You can initialize the full connection layers and convolutional layers by `Normal`.
`TruncatedNormal`: parameter initialization method. MindSpore supports multiple parameter initialization methods, such as `TruncatedNormal`, `Normal`, and `Uniform`. For details, see the description of the `mindspore.common.initializer` module of the MindSpore API.
The following is the sample code for initialization:
MindSpore supports multiple parameter initialization methods, such as `TruncatedNormal`, `Normal`, and `Uniform`, default value is `Normal`. For details, see the description of the `mindspore.common.initializer` module of the MindSpore API.
To use MindSpore for neural network definition, inherit `mindspore.nn.cell.Cell`. `Cell` is the base class of all neural networks (such as `Conv2d`).
Define each layer of a neural network in the `__init__` method in advance, and then define the `construct` method to complete the forward construction of the neural network. According to the structure of the LeNet network, define the network layers as follows: