목록손실함수 (1)
Stack Building
신경망 공부하면서 궁금한 것들 셀프 질답 2
1. 손실 함수(Loss Function)를 코드로 구현하면? (1) Softmax def softmax(X): exps = np.exp(X) return exps / np.sum(exps) (2) Stable Softmax def stable_softmax(X): exps = np.exp(X - np.max(X)) return exps / np.sum(exps) (3) Cross-Entropy def cross_entropy(X,y): """ X is the output from fully connected layer (num_examples x num_classes) y is labels (num_examples x 1) Note that y is not one-hot encoded vector. I..
딥러닝
2019. 8. 25. 11:52