Google ML Bootcamp
-
롯데 ON 방문기Google ML Bootcamp 2023. 10. 11. 17:27
Google ML Bootcamp에 합류한지도 어언 한 달이 지났다. 코세라 강의도 열심히 수강해서 이제 종지부를 찍고 Kaggle 팀도 구한 상태에서 마침 이번 Tech Talk은 롯데 ON에 직접 방문해서 오프라인 미팅을 할 수 있는 기회가 주어졌다. 바로 궁금한 질문을 사전 질문으로 올리고, 재빠르게 신청을 해서 롯데사옥을 방문할 수 있게 되었다. 신촌에서 무려 40분이나 걸려서 잠실역에 도착을 했는데, 대체 어디가 어딘지 전혀 모르겠어서 2번 출구에서 이리갔다 저리갔다 한참을 헤메었다. 네이버 지도를 검색해도 서울스카이, 시그니엘 호텔이 나오고 이게 대체 어디가 어딘지 전혀 갈피를 못잡다가 그냥 서울스카이를 가보자는 생각으로 발걸음을 옮겼는데 뭔가 저기로 가면 회사가 있을 것 같다는 생각이 들어서..
-
Transformer NetworksGoogle ML Bootcamp/Sequence Models 2023. 10. 4. 20:12
※ Self Attention - q : query - K : key - V : value - 이 벡터들은 각 단어에 대한 Attention 값을 계산하기 위한 핵심 input이다. - q = W^Q * x - K = W^K * x - V = W^V * x - q을 다른 자리에 있는 단어들과의 상관관계를 인식 시키기 위해 q * K, ..., q * K의 형태로 만들어 벡터화시킨다. 이렇게 모든 단어를 연결하여 문장의 의미로 인식되게 만든다. - 5개의 단어로 표현 될 수 있는 문장에서 A 단어를 표현하기 위해서 V, ..., V 와 q * K, ... q * K를 각각 곱하고 전의 모든 값들을 합한다. 이렇게 A ~ A의 모든 단어를 표현할 수 있다. - softmax 함수의 분모 d_k^(1/2)는 ..
-
Various Sequence To Sequence ArchitecturesGoogle ML Bootcamp/Sequence Models 2023. 10. 3. 12:59
※ Picking the Most Likely Sentence - Language model : 항상 0 벡터를 입력으로 해서 모델링한다. - Machine translation : 입력 문장의 표현을 파악하는 인코딩 부분 + 해당 입력 문장을 사용하여 디코딩된 네트워크를 사용함. -> 조건부 언어 모델이라 부르고, 어떤 문장의 확률을 모델링 하는 대신 입력한 어떤 문장에 대한 번역을 모델링한다. - 분포를 무작위로 샘플링 하지 않고, 조건부 확률을 극대화하는 문장 y를 찾는다. - 수식의 항을 최대화하는 y값을 찾도록 알고리즘을 짜야한다. - visiting 보다 going이 더 일반적으로 사용되는 단어라, 확률이 높기 때문에 greedy search를 하게 되면 두번째 문장이 선택되어 덜 최적인 문장..
-
Learning Word Embeddings: Word2vec & GloVeGoogle ML Bootcamp/Sequence Models 2023. 10. 2. 14:53
※ Word2Vec ■ Skip Gram Model - Vocab size가 10,000 이라고 할 때, context X와 target Y(learn 하고 싶은 단어)를 설정한다. - O_c -> E -> e_c -> O_softmax -> yhat (e_c = E * O_c) - E는 e_c에 해당하는 매개 변수를 가진다. - O_softmax에는 theta_t 매개 변수를 제공하는 매개 변수도 있다. - 모든 매개 변수를 기준으로 Loss Function을 최적화하면 실제로 상당량의 vector 포함 set을 얻을 수 있다. - softmax : p(t | c) - y라는 target vector를 형성했을 때, learn 하고 싶은 단어의 숫자가 4834라면 이는 target vector의 483..
-
Word EmbeddingsGoogle ML Bootcamp/Sequence Models 2023. 10. 1. 12:14
※ Using Word Embeddings - 낮은 차원의 feature vector를 사용할 수 있다. -> 1만 차원 one-hot vector를 사용하는 대신 300차원의 dense vector를 사용할 수 있다. - finetuning의 경우 차원이 매우 크고, 데이터가 많을 경우에만 사용한다. - 상대적으로 작은 훈련 세트를 가질 때 가장 큰 차이를 만드는 경향이 있다. - 명명된 Entity 인식, 텍스트 요약, 공동 참조 해결, 구문 분석에 유용하고, 언어 모델링, 기계 번역에 적합하지 않다. - A에 대한 데이터 양이 많은 경우에 가장 유용하고, B에 대해 상대적으로 작은 데이터 셋을 가질 때 유용하다. ※ Properties of Word Embeddings - e(man) - e(wom..
-
Recurrent Neural NetworksGoogle ML Bootcamp/Sequence Models 2023. 9. 29. 16:34
※ Recurrent Neural Network Model - Problem 1 : 입력과 출력이 다른 예시에서 다른 길일 수 있음. 모든 단일 예시가 같은 입력 길이 T_x 이거나 같은 대문자 길이 T_y를 가지지 않고 모든 문장은 최대 길이가 아니다. - Problem 2 : 텍스트의 서로 다른 위치에서 학습한 기능을 공유하지 않는다. - 단일 신경망에서와 같이 하나의 Input에 Output이 하나가 존재하는 느낌이 아니라, 신경망을 여러개 연결 하는 느낌으로 순환신경망을 구성한다. - 모든 노드마다 같은 파라미터값을 가지고 Input은 Wax, Output은 Wya가 된다. - yhat_Ty에서는 x_1, x_2, x_3, ..., x_Ty까지의 정보를 모두 얻을 수 있음. - 약점 : RNN은 ..
-
Face recognition & Neural Style TransferGoogle ML Bootcamp/Convolutional Neural Networks 2023. 9. 27. 17:14
※ One-shot Learning - Learning from one example to recognize the person again. - Learning a "similarity" function 을 이용한다. ※ Siamese network - Parameters of NN define an encoding f(xi) -> 신경망이 f(xi)를 인코딩하여 이 128차원을 출력한다. - same person인지 different person인지를 이렇게 판단한다. ※ Triplet Loss - 두 개 이상의 이미지를 비교해야한다. - Anchor image, Positive image, Negative image 이렇게 3개의 이미지를 비교하기 때문에 삼중항 Loss라고 불린다. - f(A) - ..
-
Detection AlgorithmsGoogle ML Bootcamp/Convolutional Neural Networks 2023. 9. 25. 21:59
※ Landmark detection - 얼굴 사진의 왼쪽 눈을 기준으로 할 경우 그 지점이 (x, y)가 된다. - 사진이 ConvNet을 통과할 때 특정 세트를 가지게 할 것이고, 64개의 landmark가 있으면 l1x, l1y, ... l64x, l64y, face 인지 아닌지 까지 총 129개의 출력 유닛을 가진다. - 얼굴 자체 뿐만 아니라 얼굴에서의 랜드마크들을 모두 가르쳐 줄 수 있다. - 얼굴에서 감정을 인식하는 기본 구성가 되고 snapchat 사진 같은 AR 증강현실 필터도 얼굴에 특수 효과를 가져 올 수 있음. - 포즈에 관심이 있다면 랜드 마크를 어깨, 팔, 다리 등으로 지정해서 ConvNet을 통과시키면 된다. ※ Object detection - sliding window ob..