전체 글
-
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..
-
Case Studies & ConvNet practical AdviceGoogle ML Bootcamp/Convolutional Neural Networks 2023. 9. 24. 19:45
※ Classic Networks 1. LeNet - 5 - 초창기 모델임(60,000개의 parameter) - LeNet-5가 풀링 이후 비선형성을 가진다.(풀링 이후 sigmoid를 가진다.) 2. AlexNet - 약 6천만 개의 parameter를 가진다. - 훨씬 많은 hidden layer를 가지고, 더 많은 데이터에 대해서 훈련을 받음. - ReLU - 두 개의 GPU에 대해 복잡한 방식으로 훈련 실시 -> 많은 계층이 실제로 두 개의 서로 다른 GPU로 분할되어 있으며 두 GPU가 서로 통신할 수 있는 시기를 고려하여 조정됨. 3. VGG - 16 ※ ResNets - short cut / skip connection : 칸을 뛰어 넘어서 다음 layer와 연결시키는 기법 - 5개로 구획..
-
Convolutional Neural NetworksGoogle ML Bootcamp/Convolutional Neural Networks 2023. 9. 23. 17:11
※ Edge Detection Example - 6*6 Matrix와 3*3 Matrix를 컨볼루션하여 4*4 Matrix로 output을 출력함. - 합성곱 연산으로 이미지에서 편리하게 vertical edge를 찾고 구체화 시킬 수 있게 한다. ※ Padding ■ 합성곱 신경망의 단점 1. Convolution을 진행하게 되면 합성곱 연산을 적용할 때마다 이미지가 축소됨 -> 엣지 검출 or 다른 기능 설정 시 이미지 축소 2. 모서리에 있는 픽셀의 경우 3*3이라도 작은 모서리 픽셀의 결과 중 Matrix 하나에서만 사용되는 것처럼 터치가 됨. -> 가운데 픽셀의 경우는 3*3 컨볼루션 시 중복되는 Matrix가 많음. but, 모서리나 엣지의 픽셀은 결과에서 훨씬 적게 사용되는 것처럼 보여 이미..
-
Structuring Machine Learning Projects - Week2Google ML Bootcamp/structuring Machine Learning Projects 2023. 9. 19. 19:58
※ Transfer Learning - 한 분야의 문제를 해결하기 위해서 얻은 지식과 정보를 다른 문제를 푸는데 사용하는 방식. - 컴퓨터 비전의 영역에서 전이 학습으로 수행된 모델들이 높은 성능을 보이고 있음. - ImageNet과 같은 데이터셋으로 이미 학습된 pretrained Model을 사용해서 뒷 부분에 FC를 붙여서 학습시킴. - 초깃값으로 이미 학습된 model을 사용할 수 있어 학습 속도 면에서 2~3배의 효과를 낼 수 있음. ※ Multi-task Learning - transfer Learning에서는 A작업을 배우고 B작업으로 넘어가는 과정에서 순차적인 과정이 필요했으나 Multi-task Learning에서는 일을 동시에 시작하여 신경망이 여러가지 일을 동시에 할 수 있어, 각각의..