목록softmax (1)
함께 배워가는 학생개발자
Softmax function
Softmax Function 식 : tensorflow 코드 : * cost 식 직접 구할 때hypothesis = tf.nn.softmax(tf.matmul(X,W)+b)cost = tf.reduce_mean(-tf.reduce_sum(Y * tf.log(hypothesis), axis = 1)optimizer = tf.train.GradientDescentOptimizer(learning_rate = 0.1).minimize(cost) * cost cross_entropy_with_logits 함수 사용할 때Y_one_hot = tf.one_hot(Y, nb_classes) # shape = (?, 1, 7)Y_one_hot = tf.reshape(Y_one_hot, [-1, nb_classes])..
머신러닝
2017. 5. 15. 00:55