# Research on Speech Emotion Recognition Method Based A-CapsNet
## 4 The Proposed Novel Model A-CapsNet
### Network Structure  
The CapsNet differs from earlier CNNs in that it employs a collection of neurons rather than a single neuron, whose activity vector reflects the instantiation parameters of a certain type of item, such as an object or object portion. The length of an activity vector reflects the chance that the entity exists, and the orientation of an activity vector represents the instantiation parameters. Active capsules at one level anticipate the instantiation parameters of high-level capsules via transformation matrices. A high-level capsule becomes activated when numerous forecasts coincide. CapsNet, in other words, produces a vector rather than a single scalar, allowing it to model global geographical information and replace pooling layers with a dynamic routing mechanism to prevent losing important data. The dynamic routing process is an information selection method that ensures that child capsule outputs are sent to the appropriate parent capsules [37; 38].  
Referring to the paper [19; 39], a brief introduction to the structure of Capsnet is presented in this section. A simple CapsNet architecture is shown in Figure 2[19]. It contains two halves. After three layers of processing, the first half produces a class prediction (two convolution layers and one fully connected layer). The first layer is a convolutional layer that uses a 9 \(\times\) 9 kernel, 256 feature mappings, a stride of 1, and ReLU non-linearity to map a 28 \(\times\) 28 image to a 6 \(\times\) 6\(\times\)256 volume. The second layer is a convolution capsule layer that uses a 9 \(\times\) 9 kernel and stride of 2 to create a 6 \(\times\) 6 \(\times\) 256 volume. The volume is now divided into 32 layers of 8-dimension capsules, for a total of 6632 capsules, along its depth. A fully connected layer of 10 separate 16-dimension capsules, each of which represents an output class, makes up the third layer. It must be noted that only the PrimaryCaps and DigitCaps layers support dynamic routing. Finally, we generate a final prediction match to the embedding with the largest magnitude using the magnitude of these 16-dimension embeddings. Reconstruction as a regularization technique is implemented in the model's second half, also known as the decoder (Figure 3). Each class's 16-dimension embeddings are concatenated, with the exception of the winning class's vector components, which are all set to 0. In addition, 10-digit classes would mean a final embedding of length 160, which is then fed through 3 fully connected layers with 512, 1024, and 764 neurons, respectively. The final 784-dimension output is reshaped into a 28 \(\times\) 28 reconstruction of the ground truth.  
Figure 2: CapsNet architecture [19].  
The proposed model A-CapsNet, as illustrated in Figure 4, consists of three convolutional layers, two average-pooling layers, an initial capsule layer, and a digital capsule layer. The dynamic routing process of the proposed model A-CapsNet is referred to in the literature [18], and differs from Capsnet, as its average-pooling layer can reduce the computational complexity and avoid over fitting. Except for the primary capsule layer and digital capsule layer, the activation function LeakyReLU is used after each convolutional layer to enhance the non-linear mapping ability of the features.