728x90 sigmoid1 [Pytorch] Softmax with CrossEntropyLoss 역전파 Softmax & Sigmoid with CrossEntropyLoss (CE Loss) forward and backward (calculate gradient). 아래 사진에 자세한 풀이과정을 적어놓음. softmax-with-CELoss의 입력(x)에 대한 역전파(미분값)는 softmax(x) - target(label). feaures of taget=1 and taget=0에 대해서는 부호를 반대로 역전파하여 모델이 cateogry classification ability를 학습한다. target이 one-hot label (single classification)이라는 전제하에, Softmax를 Sigmoid로 대체해도 미분값이 같기 때문에 동일한 결과를 얻을 수 있다. multi-class .. 2023. 7. 20. 이전 1 다음 728x90