전체 글
-
#7. Initialization연구실 2019. 10. 7. 12:42
- initialization을 잘 하면 learning에도 큰 영향을 미친다. (1) gradient descent의 convergence 속도를 빠르게 할 수 있다. (2) gradient descent의 수렴값이 낮은 training error를 가지도록 만들어준다. * Neural Network model - Zero initialization - Random initialization - He initialization: initializes the weights to random values scaled according to a paper by He et al., 2015 * Zero initialization - 두 가지 종류의 parameter를 initialize할 수 있다. (1) t..
-
#6. Building your Deep Neural Network: Step by Step연구실 2019. 10. 4. 12:03
- build a deep neural network with many layers - Notations: (1) Superscript [l]: a quantity associated with the lth layer (2) Superscript (i): a quantity associated with the ith example (3) Lowerscript i: ith entry of a vector * Outline - 필요한 과정들을 단계별로 helper function으로 만들어 사용한다. (1) Initialize the parameters for a two-layer network and for an L-layer neural network (2) Forward propagation 1. Li..
-
#5. Classification with one hidden layer연구실 2019. 10. 2. 16:46
* Dataset - a numpy-array(matrix) X that contains your features(x1, x2) - a numpy-array(vector) Y that contains your labels(red: 0, blue: 1) * Simple Logistic Regression - sklearn's build-in function을 사용하여 logistic regression 식을 학습시킬 수 있다. # Train the logistic regression classifier clf = sklearn.linear_model.LogisticRegressionCV(); clf.fit(X.T, Y.T); # Plot the decision boundary for logistic reg..
-
#4. Logistic Regression with a Neural Network midset연구실 2019. 9. 29. 23:55
* Overview of the Problem set: - dataset "data.h5" contains: 1) a training set of m_train images labeled as cat(y=1) or non-cat(y=0) 2) a test set of m_test images labeled as cat of non-cat 3) each image is of shape(height=num_px, width=num_px, channel=3) - training & train data set의 모양을 (num_px*num_px, 3)에서 싱글 벡터(num_px*num_px*3, 1로 만들어준다 # 행렬 X(a, b, c, d)를 X_flatten(b*c*d, a)로 만들기(X^T) X_flat..
-
#1. git fork & rebaseKeracon 2019. 9. 28. 17:33
1) fork 해 올 repository(예시는 https://github.com/Keracorn/HashTag)에서 상단 뒤 fork 버튼을 눌러 내 repository에 추가한다. 2) 추가하고 나면 다음과 같이 내 repository에 추가가 된다.(https://github.com/hyunbul/HashTag.git) 3) git clone (예시에서는 git clone https://github.com/hyunbul/HashTag.git)으로 파일들을 받아온다. 4) upstream을 추가한다. 이때 주소는 내 repository가 아니라 fork 했던 원 repository이다(예시 git remote add upstream https://github.com/Keracorn/HashTag.gi..
-
#3. numpy연구실 2019. 9. 26. 14:45
Numpy: main package for scientific computing in python **더하기, 빼기 등 연산시 np.add, np.multipy, np.sum 사용하기** 1) building basic functions w/ numpy 1-1 sigmoid function, np.exp(): - math.exp(): 지수함수(x -> e^x) import math def basic_sigmoid(x): """ Compute sigmoid of x. Arguments: x -- A scalar Return: s -- sigmoid(x) """ s = 1/ (1 + math.exp(-x)) return s - 하지만 딥러닝에서는 행렬과 벡터를 더 많이 사용 -> numpy를 사용한다! - ..