Pytorch (4)

Table of contents

1. RNN (Recurrent Neural Network)

Two, GAN (against generation network)

3. OCR

4. Attention mechanism


1. RNN (Recurrent Neural Network)

Mainly used in NLP (Natural Language Processing)

Two, GAN (against generation network)

Principle: There is a generator and a discriminator. As the contradiction between the two parties escalates, the performance of both parties continues to increase.

GAN network composition: generation network, discriminant network, loss function

3. OCR

Function: Extract the text in the image and convert it into text form

step:

  1. Detect where the text is located (CTPN)
  2. Recognize text region content (CRNN)

CTPN network architecture: 

VGG extracts features, BLSTM integrates context information, and completes detection based on RPN

4. Attention mechanism

For different input data, the focus is different

Attention overall calculation process:

  1. The Q of each word will calculate the score with each K
  2. After Softmax, the entire weighted result will be obtained
  3. For this matter, each word looks not just at the sequence before it but at the entire input sequence
  4. Calculate the representation results of all words at the same time

multi-headed mechanism:

  1. Get multiple eigenvalues ​​through different heads
  2. Stitch all the features together
  3. Dimensionality can be reduced by another layer of full connection

Guess you like

Origin blog.csdn.net/weixin_64443786/article/details/132048346