본문 바로가기

728x90

DeepLearning Specialization(Andrew Ng)/Sequence Models

(9)
[코세라] [Week 3] Quiz & Programming Assignments # Quiz # Programming Assignments 1st Assignments : Neural Machine Translation with Attention 1. previous timestep's prediction as input Unlike previous text generation examples earlier in the course, in this model, the post-attention LSTM at time tt does not take the previous time step's prediction y⟨t−1⟩y⟨t−1⟩ as input. The post-attention LSTM at time 't' only takes the hidden state s⟨t⟩s⟨t⟩ an..
[코세라] [Week 3_Sequence Models & Attention mechanism] 2. Speech recognition - Audio data Speech recognition - Audio data 1. Speech recognition 2. Trigger word detection 1. Speech recognition 1) Speech recognition 개요 speech recognition의 경우, 오디오클립을 위와 같이 전처리 해주어야 한다. 위쪽 그래프는 x축이 time, y축이 air pressure 밑쪽 그래프는 x축이 time, y축이 frequecies이다. 원래는 phonems (음소)를 이용해 speech recognition을 해왔으나 이제는audio clip을 인풋하고 바로 transcript를 산출하는 end-to-end deep learning을 할 수 있게 되었다(without hand engineering)...
[코세라] [Week 3_Sequence models & Attention mechanism] 1. Various sequence to sequence architecture Various sequence to sequence architecture 1. Basic Models 2. Picking the most likely sentence 3. Beam Search 4. Refinements to beam search 5. Error analysis in beam search 6. Bleu Score 7. Attention model intuition 8. Attention model 1. Basic Models 1) 번역 위와 같이 번역을 해야하는 상황에서 input sequence와 output sequence 의 크기가 다를 수 있다. 이럴 땐 위의 구조와 같이 encoder 부분과 decoder 부분을 나누어 주면 된다. 2) Image to Text 위와 같이 이미..
[코세라] [Week 2] Quiz & Programming Assignments # Quiz 1. 우리가 word2vec(혹은 GloVe 등등) 를 하는 궁극적인 목표는 context word가 인풋되었을 때, 어떤 단어가 target인가 아는 것도 중요하지만 더 중요한건 word embedding matrix를 학습하는 것이다. # Programming Assignments 1. if ~ continue # GRADED FUNCTION: complete_analogy def complete_analogy(word_a, word_b, word_c, word_to_vec_map): """ Performs the word analogy task as explained above: a is to b as c is to ____. Arguments: word_a -- a word, stri..
[코세라] [Week 2_NLP & Word Embedding] 3. Applications Using Word Embeddings Applications Using Word Embeddings 1. Sentiment Classification 2. Debiased Word Embeddings 1. Sentiment Classification 감정분석에서 가장 큰 도전과제는 labeled training set이 부족하다는 점이다. 일일이 labelling하기가 힘들다는 뜻이지. 그런데 word embedding을 이용하면 더 적은 훈련데이터로도 학습이 가능하다. 평균을 하는 이유는 문장의 크기와 관계없이 300차원으로 만들어 softmax에 돌리기 위함이지. 다만 단어의 순서를 무시하기에 아래 문장의 경우 좋은 평가라고 오해할 수 있음. 이를 개선하기 위해 RNN을 활용할 수 있음. RNN의 형태는 many-to-one 이며 RNN..
[코세라] [Week 2] 2. Learning word embeddings : Word2vec & GloVe Learning word embeddings : Word2vec & GloVe 1. Learning word embeddings 2. Word2vec 3. Negative Sampling 4. GloVe word vectors 1. Learning word embeddings 초기에 알고리즘들은 매우 복잡한 경향이 있었으나, 단순화된 구조의 알고리즘도 좋은 결과를 낸다는 연구결과들이 나왔다. 본 강의는 복잡한 알고리즘을 소개하고 이를 단순화하면서도 좋은 결과를 내는 알고리즘들에 대해 알려줄 것이다. Language model을 만든다고 할 때, 배운 바와 같이 위와 같은 구조가 될 것이며 각각의 단어는 300차원 짜리 word vector로 바뀐다. 그리고 이것을 신경망에 넣고 softmax를 돌려 다음..
[코세라] [Week 2_NLP & Word Embedding] 1. Introduction to Word Embedding Introduction to Word Embedding 1. Word Representation 2. Using word embeddings 3. Properties of word embeddings 4. Embedding Matrix 1. Word Representation 위는 기존 one-hot 벡터방식의 단어표현인데, 다음과 같은 문제점이 있다. one-hot 벡터 방식에서는 apple과 orange의 관계가 apple과 king의 관계와 다르지 않다. 따라서 설령 우리가 i want a glass of orange juice 를 학습했다 하더라도, i want a glass of apple __ 에서 'juice' 라는 답을 찾을 수 없다. 즉, 단어간의 관계를 알 수가 없는 것. 그래서 fea..
[Week 1] Quiz & Programming Assignments # Quiz 1. You are training an RNN, and find that your weights and activations are all taking on the value of NaN (“Not a Number”). Which of these is the most likely cause of this problem? Gradient Exploding 2. 다시 되새기자면, language model을 통한 random sampling sentences 에서 다음 step으로 넘기는 y_hat을 결정하는건 무작정 제일 높은 확률을 가진 단어를 선택하는 것이 아니라 그 확률대로 랜덤하게 뽑는 것. 즉 높은 확률이면 높은 확률로 뽑히겠지? 밑에 문제는 답이 4번. # Programming A..
[코세라] [Week 1] 1. Recurrent Neural Networks Recurrent Neural Networks 1. Why sequence models? 2. Notation 3. Recurrent Neural Networks 4. Backpropagation through time 5. Different types of RNNs 6. Language model and sequence generation 7. Sampling novel sequences 8. Vanishing gradients with RNNs 9. Gated Recurrent Unit 10. Long Short Term Memory(LSTM) 11. Bidirectional RNN 12. Deep RNNs 1. Why sequence models? 'Sequence' 가 있는 data의 예들이다. ..

728x90