Machine Learning and Deep Learning 49

Pytorch - Introduction to PyTorch Tensors

출처: Pytorch Official Youtube Channel Notebook can be downloaded here import torch import math Random Tensors and Seeding torch.manual_seed(1729) random1 = torch.rand(2, 3) print(random1) random2 = torch.rand(2, 3) print(random2) torch.manual_seed(1729) random3 = torch.rand(2, 3) print(random3) random4 = torch.rand(2, 3) print(random4) .manual_seed()를 통해서 RNG(MATLAB® random number generator)의 see..

Pytorch - Introduction to Pytorch

Reference: Pytorch official video Pytorch란? Research Prototyping에서 Production Deployment까지 일련의 과정을 도와주는 오픈 소스의 머신러닝 프레임워크. 1. Machine Learning Framework Deep learning primitives, NN Layer Types, activation/loss functions, Optimizers 를 포함한 Full Tool kits를 제공한다. Libraries도 제공하며, 그 중 Torch vision은 사전 학습된 모델을 제공하기도 함. 2. Research Prototyping Python으로도 Computational Graph를 그릴 수 있으며, Autograd를 사용해서 간편..

[CS224N] Lecture1. Introduction and Word Vectors

0. Introduction 인간을 '천하무적(invincible)'으로 만들어주는 것이 바로 '언어(language)', 그리고 '글쓰기(writing)'는 인간이 발견한 지식을 전파하고 공동으로 작업할 수 있도록 해 줌. meaning: Signifier(symbol) Signified (idea or thing) 우리는 컴퓨터에서 어떻게 'meaning'을 사용할까? -> NLTK 사용해 볼 수 있음(기본적인 다양한 기능을 제공하지만, 뛰어나지는 않음). WordNet의 한계 뉘앙스를 반영하지 못 함 ('good'과 'proficient'가 동의어로 나와있지만, 사실은 뉘앙스가 다르잖아) 신조어를 모름 (New words, slang words,.. ) 의미들의 관계나 유사도를 계산하지 못 함(go..

[Deep Learning] Sequence Models week4. Trans

퀴즈 오답 3. Attention 모델에 올바르게 설명된 것은 ? A(Q,K,V) = softmax 함수의 합이다! 하지만 이 값은 어떤 단어가 가장 관련 있는 답을 주고 있는 지에 대한 정보도 갖고 있음 10. 정답: 모두 선택 Sin/Cos 자체는 같으니까 Time-Stamp간의 간격은 항상 같음 마지막 Programming Assignment는 아래 튜토리얼과 거의 유사했다. (그래서인지 설명이 너무 부족했음) https://www.tensorflow.org/text/tutorials/transformer#decoder_layer 언어 이해를위한 변환기 모델 | Text | TensorFlow 이 가이드에서는 Transformer 모델 을 학습시켜포르투갈어를 영어 데이터 세트 로 번역합니다. 이것은..

[Deep Learning] Sequence Models week2-3. Sentiment Classification and Debiasing Word Embeddings

Quiz 문제 중 헷갈렸던 것: P(t|c)를 통해서 Word Embedding(단어들의 특징 벡터) 만들고 싶은거! Target과 Context 단어의 속성이 많이 겹칠수록 P(t|c)값이 커지는거고, 그러니까 Embedding train시킬 때에는 주변 단어가 맞으면 target=1이 되도록 Loss값을 계속 줄여나가는거! (그러다보면 randomly chosen되었던 Theta와 e가 점점 해당 단어의 속성을 잘 나타내는 벡터가 될테니까)

[Deep Learning] Sequence Models week1-2. Sequence Generation, Vanishing Gradients and GRU, LSTM

참고자료: 0. Stanford CS230 Deep Learning Cheat Sheet 1. How to choose activation functions (Softmax, Sigmoid, Tanh) in deep learning 2. Sampling Novel Sequences (24분부터) 퀴즈 틀린 문제: 6. 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? 오답: Vanishing Gradients 정답: Exploding Gra..