当前位置:网站首页>Essential characteristics of convolution operation +textcnn text classification

Essential characteristics of convolution operation +textcnn text classification

2022-06-25 17:38:00 Green Lantern swordsman

  1. CNN The essence of
    Three points : Sparse interaction 、 Parameters of the Shared 、 Translation invariance , For details, see link
  2. textCNN Length of convolution kernel
    Commonly used convolution kernels are 3 Kind of : 3、 ... and 、 Four 、 5、 ... and . Width is the width of our vector .( Specific details , I want to see others ,300)
  3. cnn And global vector Glove Combined thinking of
    Cnn The core of a sentence is to grasp the local information in the sentence , Is it possible to consider the global vector GLOVE Exist side by side and play a part together .
  4. CNN Why is it better than RNN Easier parallel computing
    Reference 1 link
    Reference 2 link
  5. Specific process :
    (1) Extended dimension and convolution : This is included at the end 1 dimension , namely shape=(?, 135, 128, 1),filter_shape: [3, 128, 1, 128], The result is : shape=(?, 133, 1, 128)
    Be careful : The general addition is in the 2 dimension , namely shape=(?, 1,135, 128)
    (2) Relu Function activation , The result is :shape=(?, 133, 1, 128);
    (3) Maximum pooling .
    Be careful : Convolution Padding Operation adopts valid The way , Its output dimension is :sequence_length - filter_size + 1. thus , Make a sentence into a vector .
    (4) The last three output vectors concat become shape[None,1,1,384];flat Post output is [None,384].
    (5) Dropout after , Projection output .
    (6) Loss function :softmax_cross_entropy(_with_logits).
  6. textcnn Reference articles for
    link 1
  7. Some common problems of training parameter initialization :
    link 1
原网站

版权声明
本文为[Green Lantern swordsman]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/176/202206251720254423.html