softmax是机器学习中常用的函数,计算公式如下图使用tensorflow框架执行:import tensorflow as tfa = tf.constant([3.,1.,-3.])b = tf.nn.softmax(a)sess = tf.Session()print(sess.run(b))输出 [ 0.87887824 0.11894324 0.00217852] [更多>>]
Copyright © 2012-2014 我的代码板 Inc. 保留所有权利。
页面耗时0.0166秒, 内存占用1.81 MB, 访问数据库8次
闽ICP备15009223号-1
评论:softmax函数的计算方式
softmax是机器学习中常用的函数,计算公式如下图使用tensorflow框架执行:import tensorflow as tfa = tf.constant([3.,1.,-3.])b = tf.nn.softmax(a)sess = tf.Session()print(sess.run(b))输出 [ 0.87887824 0.11894324 0.00217852] [更多>>]