# Sentiment Analysis of Online New Energy Vehicle Reviews
## 3 The Proposed Model EDC
### Deep CNN Model
The module applies a series of steps to compute the channel attention weights, which are used to refine the feature representation. By incorporating the channel attention mechanism, the model can more effectively capture the important features in the input data and adjust the representation accordingly, thereby improving the model's expressive power and performance. 1. Average Pooling and Max Pooling: Firstly, the extracted feature map matrix x is subjected to spatial dimension pooling using adaptive average pooling (avg_pool) and adaptive max pooling (max_pool). This compresses the feature map into the size of [batch_size, num_filters, 1, 1], resulting in an average value and a maximum value for each channel. 2. Fully Connected Layers: The two-dimensionally reduced one-dimensional vectors are separately passed through two fully connected layers, fc1 and fc2. fc1 reduces the input channel size to 1/16 of the original size and applies the ReLU activation function. fc2 restores the channel size to the original size. The outputs of fc1 and fc2 are then added together to obtain the outputs of the channel attention mechanism, avg_out and max_out. The avg_out and max_out are further added together to produce the final output of the channel attention mechanism, out. 3. Adding Contextual Information: The input feature map x is processed through two convolutional layers, conv1 and conv2, where conv1 has an output channel size of 1/2 of the input channels, and conv2 has the same output channel size as the input. The results of conv1 and conv2 are added to the input x to incorporate the contextual information. 4. Implementing Residual Connections: The output out of the channel attention mechanism is added to the input x to achieve residual connections. 5. Sequence Processing: The input feature map x is transformed from a feature map to a sequence. This is done by using the view and permute operations to flatten the height and width dimensions of the feature map into a one-dimensional sequence, with the batch size placed in the second dimension. The sequence feature x is then input into the BiGRU module (bigru), with an initial hidden state h0 set to a zero matrix. The BiGRU module processes the input sequence feature x and produces a new sequence feature x. The processed sequence feature x is then transformed back into the shape of the input feature map. This is achieved through dimension permutation and reshaping operations, resulting in a feature map with the same dimensions as the input x. 6. Residual Connections: The feature map x obtained after sequence processing is added to the previously obtained output of the residual connections to yield the final feature map output. (7) Output: The final feature map is passed through a global average pooling layer, which reduces the height and width dimensions to 1. The resulting feature map is then reshaped using the view operation into the shape of (batch_size, channels). This output is input into a fully connected layer, which maps the feature vector to the desired number of output classes. The softmax function is applied for classification purposes. Here is the algorithm (Algorithm 1):  
```
Input: Feature map processed by convolutional neural network (x) Output: Feature map processed by channel attention mechanism (out)
1: avg_out = fully_connected_layer1(average_pooling(x))
2: max_out = fully_connected_layer1(max_pooling(x))
3: out = avg_out + max_out
4: context = convolutional_layer2(ReLU(convolutional_layer1(x)))
5: out += context
6: out = out + x
7: x = reshaped(x)
8: h0 = initialize_hidden_state()
9: x_, = BiGRU(x, h0)
10: x = reshaped(x)
11: out + x
12: return sigmoid_activation(out)
```  
**Algorithm 1**Algorithm EV Car review sentiment analysis channel attention