본문 바로가기
728x90

Study (Data Science)121

BERT 2023. 3. 22.
CLMR) Contrastive Learning of Musical Representations (2021.03) Keyword Paper Contrastive Learning of Musical Representations Janne Spijkervet / Univ. of Amsterdam / 2021.03 https://arxiv.org/pdf/2103.09410.pdf https://github.com/Spijkervet/CLMR Points Self-supervised Wav파일을 SimCLR에 적용시킴. Used dataset MagnaTagATune Million Song Dataset. Model CLMR증강 무작위로 잘라서 : Randomly cropping a segment from an audio clip. 속도나 피치를 뒤틀어 증강하고 : Applying random speed and pitch .. 2023. 3. 16.
NNCLR) Nearest-Neighbor Contrastive Learning of Visual Representations (InfoNCE / 2021.10) Keyword NNCLR InfoNCE Paper With a Little Help from My Friends: Nearest-Neighbor Contrastive Learning of Visual Representations Debidatta Dwibedi / Google / 2021.10 https://arxiv.org/pdf/2104.14548.pdf https://github.com/MalteEbner/NNCLR Points Self-supervised learning algorithm NNCLR(NearestNeighbor Contrastive Learning of visual Representations) 을 제시함 같은 데이터에서 추출한 점을 positive라고 하는 것이 아니라, 이에 근.. 2023. 3. 15.
Triplet Loss (FaceNet / 2015.03) Triplet Loss Paper FaceNet: A Unified Embedding for Face Recognition and Clustering Florian Schroff / Google / 2015.03 https://arxiv.org/pdf/1503.03832.pdf https://github.com/davidsandberg/facenet Points Unified system으로 using embeddings generated by the same network architecture에서 can perform multiple tasks할 수 있게 되었음. 일타삼피 (세가지 기능). 상호작용을 단순화할 수 있고 효율적임. 학습에 triplet loss를 사용하여 fast convergence .. 2023. 3. 15.
Transformer 4 - GPT / BERT / 그 외 파생모델들 GPT(Generative Pre-trained Transformer) 언어모델(Language Model) 마지막 단어를 생성해내는 것을 잘해서 문장 생성에 뛰어남 단방향 attention을 사용 Transformer의 Decoder를 사용 BERT(Bidirectional Encoder Representations from Transformers) 마스크 언어모델(Masked Language Model) 문장 중간의 빈칸에 들어갈 단어를 잘찾아서 문장의 의미를 추출하는데 뛰어남 양방향 attention을 사용 Transformer의 Encoder를 사용 https://ratsgo.github.io/nlpbook/docs/language_model/bert_gpt/#gpt BERT & GPT prati.. 2023. 3. 14.
Transformer 3 - Residential Add / Normalization Residual Connection 2015 ResNet에서 소개된 잔차연결을 적용함. ResNet 잠깐 알아보기 Q9. 상식적으로 56개의 레이어를 갖는 네트워크는 20개의 레이어를 갖는 네트워크보다 성능이 좋아야 합니다. 하지만 그렇지 않았죠! 이유가 무엇인가요? >>네트워크가 깊어질 수록 Optimize(Train)하는 것이 어렵기 때문에, 얕은 네트워크가 더 좋은 성능을 보이게 된다. Q10. Residual Block은 굉장히 간단한 수식으로 표현이 가능합니다. 수식을 적어보세요. >>y = f(x) + x https://itrepo.tistory.com/36 (7) ResNet (Residual Connection) ResNet (2015)¶ ResNet은 2015년도 ILSVRC 에서 우승을.. 2023. 3. 14.
Transformer 2 - Multi Head Attention / Scaled Dot-Product Attention / Masking / Position-wise Feed Forward Network / Query, Key, Value 잠깐! 잊어버리니깐, 다시 한 번 더.. 트랜스포머 모델이란? Encoder는 input sequence를 continuous한 representation으로 바꾸고, Decoder는 이 representation을 output sequence로 바꾼다. 최종 Output은 Probability가 나옴! 먼저 0. Inputs을 embedding 후 positional encoding 하고 1. Encoder 돌리고 x 6번 Multi-Head Attention 잔차 Add + Normalization ---------------- FFW layer 잔차 Add + Normalization 2. Decoder 돌리고 x 6번 Masked - Multi-Head Attention (현재 위치보다 더 뒤에 .. 2023. 3. 14.
Contrastive Loss (similarity metric / face verification / 2005.06) Contrastive Loss Paper Learning a similarity metric discriminatively, with application to face verification Sumit Chopra (2005.06 / NYU) PDF / Github 없음 Points Recognition, Verification 문제에 method for training a similarity metric from data를 제시함. similar and dissimilar한 포인트 두 개로 계산한 loss라고 하여 contrastive loss라는 말이 처음 유래함. L1 norm을 사용하여 semantic distance를 측정하고, input patterns into a target space 함.. 2023. 3. 13.
유사도 Similarity / 거리 Distance 유클리드 거리(Euclidean distance): 두 점 / 직선 거리 맨해튼 거리(Manhattan distance): 두 점 수직/수평 거리 (블록거리같은 지리적 위치데이터를 측정할 수 있음) 코사인 유사도(Cosine similarity): 두 벡터 / 각도 / 주로 고차원 데이터에 적합 (각도라 차원의 영향을 받지 않음) 자카드 유사도(Jaccard similarity): 두 집합 / 공통 원소 비율 (영상처리) 매치 유사도(Match similarity): 문자열, 시퀀스 데이터 / 부분 문자열이 얼마나 일치하는지를 계산 (문자열 매칭, 검색) 편집 거리(Edit distance): 두 문자열 사이의 삽입, 삭제, 대체 연산의 최소 횟수를 계산 (음성인식, 문자열매칭) 이 중에서 유클리드 거리.. 2023. 3. 12.
L1, L2 (loss, regularization, norm) L1 loss : MAE 실제값 yi 와 예측값 f(xi)의 편차의 절댓값의 합 L2 loss : MSE 실제값 yi 와 예측값 f(xi)의 편차의 제곱의 합 Robust : L1 > L2 L1이 outlier에 더 robust 하다. (=loss function이 영향을 덜 받는다) 왜냐하면, L2는 편차에 제곱까지 해버리기 때문에 이상치가 나오면 그 편차를 제곱해서 그 영향이 클 수 밖에 없다. outlier가 무시되길 원하면 비교적 영향을 작게받는 L1 loss가 적합하다. Stablity : L2 > L1 L2 loss는 smooth한 convex 형태의 함수로 그래프또한 원형. 그래서 모든 점에서 미분이 가능하다. 그렇기 때문에 미분이 전부인 딥러닝에서는 L2가 계산에 더 안정적이라고 본다. S.. 2023. 3. 12.
728x90