The key point is to select a proper model. The model generally refers to a deep convolutional neural network (CNN), such as AlexNet, VGG, GoogleNet, and ResNet.
MindSpore presets a typical CNN, such as LeNet, which can be directly used by developers. The usage method is as follows:
```python
frommindspore.model_zoo.lenetimportLeNet5
network=LeNet(num_classes)
```
MindSpore presets a typical CNN, developer can visit [model_zoo](https://gitee.com/mindspore/mindspore/tree/r0.5/model_zoo) to get more details.
MindSpore supports the following image classification networks: LeNet, AlexNet, and ResNet.
...
...
@@ -148,10 +143,9 @@ CNN is a standard algorithm for image classification tasks. CNN uses a layered s
ResNet is recommended. First, it is deep enough with 34 layers, 50 layers, or 101 layers. The deeper the hierarchy, the stronger the representation capability, and the higher the classification accuracy. Second, it is learnable. The residual structure is used. The lower layer is directly connected to the upper layer through the shortcut connection, which solves the problem of gradient disappearance caused by the network depth during the reverse propagation. In addition, the ResNet network has good performance, including the recognition accuracy, model size, and parameter quantity.
MindSpore Model Zoo has a built-in ResNet model. In this example, the ResNet-50 network is used. The calling method is as follows:
MindSpore Model Zoo has a ResNet [model](https://gitee.com/mindspore/mindspore/blob/r0.5/model_zoo/resnet/src/resnet.py). The calling method is as follows: