전체 글
-
#22. Operations on word vectors연구실 2019. 10. 26. 02:50
* Cosine similarity - 두 단어가 얼마나 similar한 지 계산하기 위해 cosine sililarity를 사용한다. - 두 단어 벡터에 대해: # GRADED FUNCTION: cosine_similarity def cosine_similarity(u, v): """ Cosine similarity reflects the degree of similariy between u and v Arguments: u -- a word vector of shape (n,) v -- a word vector of shape (n,) Returns: cosine_similarity -- the cosine similarity between u and v defined by the formula ab..
-
#21. Improvise a Jazz Solo with an LSTM Network연구실 2019. 10. 24. 21:29
* Problem statement (1) Dataset - X: (m, Tx, 78), m개의 training example은 Tx = 30의 musical 값으로 이루어져 있으며, 각 time step에서 input은 78개의 one-hot vector로 이루어진 값이다. 따라서 x[i, t, :]는 i번째 예시에서 t 시간일 때 one-hot vector이다. - Y: X와 거의 같지만 X보다 이전 단계를 나타낸다. - n_values: 데이터셋에서 unique한 값, 여기선 78. - indices_values: 0-77까지의 musical value들을 파이썬 딕셔너리로 매핑한 값. (2) Overview of our model * Building the model - X는 (m, Tx, 78)..
-
#20. Dinosaur Island - Character-Level Language Modeling연구실 2019. 10. 24. 18:18
- RNN을 이용해 text data를 저장하는 방법 - 각 단계에서 prediction을 샘플링하고 다음 RNN-cell unit에 전달하며 data를 합성하는 방법 - character-level text generation RNN을 만드는 방법 - gradient를 clipping하는게 왜 중요한지 * Problem Statement (1) Dataset and Preprocessing - 데이터셋을 읽어 unique한 character들의 list를 만든다. - 예시에서는 27개(a-z + \n)개의 character를 사용한다. (2) Overview of the model - Initialize parameters - Run the optimization loop - Forward propag..
-
#19. Building your Recurrent Neural Network - Step by Step연구실 2019. 10. 23. 23:56
- RNN: memory를 가지기 때문에 NLP를 비롯한 다른 task들에 매우 효과적으로 작동한다. - hidden layer activation에서 정보나 문맥을 기억하는데, uni-directional RNN에서 과거의 정보를 이후의 layer에 넣을 수 있게 만들어준다. bidirectional RNN은 과거와 미래의 문맥 둘 다 고려가 가능하다. * Foward propagation for the basic Recurrent Neural Network - 본 예시에서는 Tx = Ty - 1. 한 과정에 필요한 계산을 implement / 2. Tx time-step 동안 loop를 돌린다. (1) RNN cell # GRADED FUNCTION: rnn_cell_forward def rnn_ce..
-
#18. Face Recognition for the Happy House연구실 2019. 10. 18. 22:46
- Face recognition 문제는 은 보통 두 가지로 나뉜다. (1) Face Verification: "Is this the claimed person?", 1:1 matching problem (2) Face Recognition: "Who is this person?", 1:K matching problem - FaceNet은 얼굴 이미지를 128개의 원소로 이루어진 벡터로 인코딩하여 학습시키게 된다. 두 벡터를 비교해 같은 사람인지를 판별한다. * Encoding face images into a 128-dimensional vector (!) Using an ConvNet to compute encodings - 96*96의 RGB 이미지를 사용, (m, nC, nH, nW) = (m, ..
-
#17. Deep Learning & Art: Neural Style Transfer연구실 2019. 10. 18. 20:51
- created by Gatys et al. (2015) (https://arxiv.org/abs/1508.06576). * Problem Statement - Neural Style Transfer: content image(C)와 style image(S)를 합쳐 generated image(G)를 만드는 알고리즘. * Transfer Learning - VGG 네트워크(VGG-19)를 이용해 모델을 만든다. 이 모델은 이미 ImageNet DB의 이미지들로 학습이 되어있는 상태이며, low level의 feature부터 high level feature까지 학습이 된 상태이다. * Neural Style Transfer (1) Content cost function: Jcontent(C, G) (..
-
#16. Autonomous driving - Car detection연구실 2019. 10. 15. 17:32
- YOLO 모델을 이용해 object detection을 사용해보자. * Problem Statement - 데이터셋: - 객체의 유무(pc), 객체가 존재한다면 그 위치(bx, by, bh, bw), 객체 라벨(c) * YOLO - real-time 안에 실행시킬 수 있으며 정확도 또한 높기 때문에 자주 사용되는 알고리즘. - "Only looks once": 이미지를 한번만 본 다음에 계산한다. 예측을 하기까지 오직 한번의 forward propagation pass만 필요로 하기 때문이다. - 예측을 한 뒤 non-max suppression 과정을 수행한 뒤 결과를 반환한다. (1) Model details - input: (m, 608, 608, 3) - output: (pc,bx,by,bh,..
-
#2. Pandas 함수 정리Keracon 2019. 10. 15. 14:27
* 파일 열기 df = pd.read_csv('파일명') * 특정 열의 데이터 추출 df.loc[:, 'result']: result 행의 모든 데이터 추출 df.loc[:10, 'result']: result 행의 데이터 처음부터 10번째행까지 추출 * 새로운 파일로 쓰기 a.to_csv('파일명', index=False) * 새롭게 파일 만들기 file=open("만들파일명", 'w', newline='', encoding='utf-8-sig') wr = csv.writer(file) header = ["ID", "번역"] wr.writerow(header) # 행 작성하기 for i in range(count): text = df['Image_Content_txt_result'][i] transla..