這裏是我的代碼: import tensorflow as tf
with tf.Session() as sess:
y = tf.constant([0,0,1])
x = tf.constant([0,1,0])
r = tf.nn.sparse_softmax_cross_entropy_with_logits(labels=y, logits
我知道二元交叉熵與兩類中的分類交叉熵相同。 此外,我很清楚softmax是什麼。 因此,我看到明確的交叉熵懲罰只是將一個部件(概率)應爲1。 但爲什麼,不能或不應我使用二進制交叉熵上一熱載體? Normal Case for 1-Label-Multiclass-Mutual-exclusivity-classification:
################
pred = [0.1