In this paper, the input of a word is represented by the word and its context c l w i
ð Þ
represents the text to the left of the word w i , and c r w i
ð Þ represents the text to the right of
the word w i , then each word in the article is represented by x i :
x i ¼ c l w i
ð Þ; e w 2
ð Þ; c r w i
ð Þ
½
ð 1Þ
Next, we will make a linear transformation of the input of the word and generate
y
ð1Þ
i by the activation function to pass to the largest pooling layer to try to find the most
important latent semantic factor, producing y
2
ð Þ .
y
ð1Þ
i ¼ tanh W
ð1Þ x i þ b
ð1Þ
ð2Þ
y
ð2Þ
¼ max
n
i¼1
y
ð1Þ
i
ð3Þ
In the output layer, y
ð2Þ generated in the pooled layer is used as the input value of
the output layer, then the output of each neuron in the output layer is expressed as:
y
ð3Þ
¼ f W
ð3Þ y
ð2Þ
þ b
ð3Þ
ð4Þ
where y
ð2Þ represents the input of the neuron, W
ð3Þ represents the weight, b
ð3Þ represents
the offset value, and f represents the activation function. The output value y
ð3Þ is sent to
the softmax classifier for probability distribution, and finally, the event recognition is
completed. The formula is as follows:
p i ¼
exp y
ð3Þ
i
P n
k¼1 exp y
ð3Þ
k
ð5Þ
3.2 Model Improvement
Firstly, by training and testing the traditional RCNN, the accuracy is only 53.5%. This
result is far from enough. The article will improve the model from the following two
parts.
(1) Change of bidirectional RNN
As an improvement to the RNN, LSTM adds three control units to the traditional
model: input gates, output gates, and forgetting gates. As the information enters the
model, the units in the LSTM will judge the information, and the information that
conforms to the rules will be left, and the non-compliant information will be forgotten.
This method solves the long sequence dependency problem in the RNN model.
98
H. He et al.
ð Þ
represents the text to the left of the word w i , and c r w i
ð Þ represents the text to the right of
the word w i , then each word in the article is represented by x i :
x i ¼ c l w i
ð Þ; e w 2
ð Þ; c r w i
ð Þ
½
ð 1Þ
Next, we will make a linear transformation of the input of the word and generate
y
ð1Þ
i by the activation function to pass to the largest pooling layer to try to find the most
important latent semantic factor, producing y
2
ð Þ .
y
ð1Þ
i ¼ tanh W
ð1Þ x i þ b
ð1Þ
ð2Þ
y
ð2Þ
¼ max
n
i¼1
y
ð1Þ
i
ð3Þ
In the output layer, y
ð2Þ generated in the pooled layer is used as the input value of
the output layer, then the output of each neuron in the output layer is expressed as:
y
ð3Þ
¼ f W
ð3Þ y
ð2Þ
þ b
ð3Þ
ð4Þ
where y
ð2Þ represents the input of the neuron, W
ð3Þ represents the weight, b
ð3Þ represents
the offset value, and f represents the activation function. The output value y
ð3Þ is sent to
the softmax classifier for probability distribution, and finally, the event recognition is
completed. The formula is as follows:
p i ¼
exp y
ð3Þ
i
P n
k¼1 exp y
ð3Þ
k
ð5Þ
3.2 Model Improvement
Firstly, by training and testing the traditional RCNN, the accuracy is only 53.5%. This
result is far from enough. The article will improve the model from the following two
parts.
(1) Change of bidirectional RNN
As an improvement to the RNN, LSTM adds three control units to the traditional
model: input gates, output gates, and forgetting gates. As the information enters the
model, the units in the LSTM will judge the information, and the information that
conforms to the rules will be left, and the non-compliant information will be forgotten.
This method solves the long sequence dependency problem in the RNN model.
98
H. He et al.
