Skip to content

Latest commit

 

History

History
32 lines (30 loc) · 1.48 KB

6.multinomial.md

File metadata and controls

32 lines (30 loc) · 1.48 KB

Multinomial 개념

image

image

image

image

Softmax

image

  • 0 ~ 1 사이의 값
  • 전체의 Sum이 1 (확률로서의 의미를 지닌다.)
hypothesis = tf.nn.softmax(tf.matmul(X, W) + b)

One-hot Encoding

가장 큰 값만 1.0, 나머지는 0으로 선택 분류. (argmax) image

image

image

Logistic cost function vs. Cross Entropy

image

cost = tf.reduce_mean(-tf.reduce_sum(Y * tf.log(hypothesis), axis = 1))
optimizer = tf.train.GradientDescentOptimizer(learning_rate=0.1).minimize(cost)