Telegram Group & Telegram Channel
CLASSIC NLP RNN & CNN
#grokaem_nlp #grokaem_собес

Напоминаю ссылку на 100 вопросов и уже +- половину ответов

На 100 вопросов я время от времени отвечаю, порой сильно заставляя себя повторить какую-то базу. Да, многие аспекты старые как мир, но я же обещала(((

*исправляйте, если что не так*

🥸 - взрослый дядя собеседующий
👩🏻‍💻 - я и вы

🥸 28. Какие виды RNN сетей вы знаете? Объясните разницу между GRU и LSTM?
👩🏻‍💻Главное отличие - это то, как LSTM и GRU понимают memory cell. Для LSTM memory cell и hidden state это две разных компоненты. In GRU, the memory cell это candidate activation vector, который мы апдейтим.

- vanilla RNN - update without any gates
code, math example
- LSTM
Имеет три главных gates: forget, input and output gate.
- input gate - updates the cell state given the previous hidden state and current input.
- forget gate - decides what information should be thrown away or kept also given hidden state and current input. Information from the previous hidden state and information from the current input is passed through the sigmoid function. Values come out between 0 and 1. The closer to 0 means to forget, and the closer to 1 means to keep.
- output gate - The output gate decides what the next hidden state should be based on the previous hidden state, current input and modified cell state.
Remember that the hidden state contains information on previous inputs. The hidden state is also used for predictions.
- GRU
reset and update gates only
At each time step, the GRU computes a “candidate activation vector” that combines information from the input and the previous hidden state. This candidate vector is then used to update the hidden state for the next time step.
- update gate - forget + input gate → what info to throw away from the current info and what info to add
- reset gate - how much of the previous hidden state to forget according to the current input - how much the previous hidden state is reset.

В GRU мы объединили единое скрытое состояние для передачи информации, в то время как у LSTM было два состояния: отдельное ячейки и общее скрытое состояние. Таким образом, GRU имеет меньше параметров и часто обучается быстрее.

🥸 29. Какие параметры мы можем тюнить в такого вида сетях?
👩🏻‍💻Кол-о слоев, number of units, bidirectional and not bidirectional.

🥸30. Что такое затухающие градиенты для RNN? И как вы решаете эту проблему?
👩🏻‍💻Vanishing gradient проблема обозначает, что градиент становится очень маленьким, и мы не можем обновить параметры значительно, чтобы что-то выучить. В то время как взрыв градиента обозначает обратную ситуацию, когда градиент становится очень большой и мы “перепрыгнем” минимум функции.
Для решения проблемы мы можем использовать как и более сложные сети: LSTM, GRU, так и методы, которые применимы к другим видам сетей:
- gradient clipping
- batch norm
- activation function - поменять ReLU на LeakyReLU и альтернативы:
It suffers from a problem known as *dying* ReLus wherein some neurons just die out, meaning they keep on throwing 0 as outputs with the advancement in training.

link

🥸31. Зачем в NLP Convolutional neural network и как вы его можете использовать? С чем вы можете сравнить cnn в рамках парадигмы attention?
👩🏻‍💻CNN могут обрабатывать текст окном, что позволяет захватывать local patterns. Тем самым CNN могут полезны для извлечения локальных паттернов, например, n-gramы. best explanation ever

CNN для текста можно сравнить с local attention как с monotonic, так и с predictive alignment. В случае с CNN агрегация идет относительно pooling и мы можем уменьшать карту активации, а в случае с attention мы будем агрегировать относительно функции внимания, но карта не будет меняться в размерности. link

Все картинки прикладываю в комментариях, их и иногда формулы вы можете посмотреть в notion.
20🔥7👍2



group-telegram.com/grokaem_seby/324
Create:
Last Update:

CLASSIC NLP RNN & CNN
#grokaem_nlp #grokaem_собес

Напоминаю ссылку на 100 вопросов и уже +- половину ответов

На 100 вопросов я время от времени отвечаю, порой сильно заставляя себя повторить какую-то базу. Да, многие аспекты старые как мир, но я же обещала(((

*исправляйте, если что не так*

🥸 - взрослый дядя собеседующий
👩🏻‍💻 - я и вы

🥸 28. Какие виды RNN сетей вы знаете? Объясните разницу между GRU и LSTM?
👩🏻‍💻Главное отличие - это то, как LSTM и GRU понимают memory cell. Для LSTM memory cell и hidden state это две разных компоненты. In GRU, the memory cell это candidate activation vector, который мы апдейтим.

- vanilla RNN - update without any gates
code, math example
- LSTM
Имеет три главных gates: forget, input and output gate.
- input gate - updates the cell state given the previous hidden state and current input.
- forget gate - decides what information should be thrown away or kept also given hidden state and current input. Information from the previous hidden state and information from the current input is passed through the sigmoid function. Values come out between 0 and 1. The closer to 0 means to forget, and the closer to 1 means to keep.
- output gate - The output gate decides what the next hidden state should be based on the previous hidden state, current input and modified cell state.
Remember that the hidden state contains information on previous inputs. The hidden state is also used for predictions.
- GRU
reset and update gates only
At each time step, the GRU computes a “candidate activation vector” that combines information from the input and the previous hidden state. This candidate vector is then used to update the hidden state for the next time step.
- update gate - forget + input gate → what info to throw away from the current info and what info to add
- reset gate - how much of the previous hidden state to forget according to the current input - how much the previous hidden state is reset.

В GRU мы объединили единое скрытое состояние для передачи информации, в то время как у LSTM было два состояния: отдельное ячейки и общее скрытое состояние. Таким образом, GRU имеет меньше параметров и часто обучается быстрее.

🥸 29. Какие параметры мы можем тюнить в такого вида сетях?
👩🏻‍💻Кол-о слоев, number of units, bidirectional and not bidirectional.

🥸30. Что такое затухающие градиенты для RNN? И как вы решаете эту проблему?
👩🏻‍💻Vanishing gradient проблема обозначает, что градиент становится очень маленьким, и мы не можем обновить параметры значительно, чтобы что-то выучить. В то время как взрыв градиента обозначает обратную ситуацию, когда градиент становится очень большой и мы “перепрыгнем” минимум функции.
Для решения проблемы мы можем использовать как и более сложные сети: LSTM, GRU, так и методы, которые применимы к другим видам сетей:
- gradient clipping
- batch norm
- activation function - поменять ReLU на LeakyReLU и альтернативы:

It suffers from a problem known as *dying* ReLus wherein some neurons just die out, meaning they keep on throwing 0 as outputs with the advancement in training.

link

🥸31. Зачем в NLP Convolutional neural network и как вы его можете использовать? С чем вы можете сравнить cnn в рамках парадигмы attention?
👩🏻‍💻CNN могут обрабатывать текст окном, что позволяет захватывать local patterns. Тем самым CNN могут полезны для извлечения локальных паттернов, например, n-gramы. best explanation ever

CNN для текста можно сравнить с local attention как с monotonic, так и с predictive alignment. В случае с CNN агрегация идет относительно pooling и мы можем уменьшать карту активации, а в случае с attention мы будем агрегировать относительно функции внимания, но карта не будет меняться в размерности. link

Все картинки прикладываю в комментариях, их и иногда формулы вы можете посмотреть в notion.

BY grokaem себя


Warning: Undefined variable $i in /var/www/group-telegram/post.php on line 260

Share with your friend now:
group-telegram.com/grokaem_seby/324

View MORE
Open in Telegram


Telegram | DID YOU KNOW?

Date: |

Right now the digital security needs of Russians and Ukrainians are very different, and they lead to very different caveats about how to mitigate the risks associated with using Telegram. For Ukrainians in Ukraine, whose physical safety is at risk because they are in a war zone, digital security is probably not their highest priority. They may value access to news and communication with their loved ones over making sure that all of their communications are encrypted in such a manner that they are indecipherable to Telegram, its employees, or governments with court orders. The regulator took order for the search and seizure operation from Judge Purushottam B Jadhav, Sebi Special Judge / Additional Sessions Judge. Perpetrators of these scams will create a public group on Telegram to promote these investment packages that are usually accompanied by fake testimonies and sometimes advertised as being Shariah-compliant. Interested investors will be asked to directly message the representatives to begin investing in the various investment packages offered. "Russians are really disconnected from the reality of what happening to their country," Andrey said. "So Telegram has become essential for understanding what's going on to the Russian-speaking world." The regulator said it had received information that messages containing stock tips and other investment advice with respect to selected listed companies are being widely circulated through websites and social media platforms such as Telegram, Facebook, WhatsApp and Instagram.
from kr


Telegram grokaem себя
FROM American