import tensorflow as tf logits = tf.random.uniform([1,10],minval=-2,maxval=2) print('logits:',logits) prob = tf.nn.softmax(logits) print('softmax后:',prob) p_sum = tf.reduce_sum(prob) print('相加值:',p_sum)
import tensorflow as tf logits = tf.random.uniform([1,10],minval=-2,maxval=2) print('logits:',logits) prob = tf.nn.softmax(logits) print('softmax后:',prob) p_sum = tf.reduce_sum(prob) print('相加值:',p_sum)
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。