![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
tensorflow
人工智能小白菜
如果对博客或者博客中的程序有疑问欢迎和我一起探讨,微信:799330288
展开
-
tensorflow中的tf.nn.softmax()和tf.reduce_sum(),tf.reduce_mean()
tf.softmax()比较好理解,就是求各个值的比重,看下面程序的例子就知道了。 tf.reduce_sum(),tf.reduce_mean()常出现的地方例如: cross_entropy = tf.reduce_mean(-tf.reduce_sum(y_ * tf.log(y), reduction_indices=[1])) 从reduce_sum的源码定义中看,def reduce...原创 2019-01-20 02:33:27 · 519 阅读 · 0 评论 -
tensorflow2.0初体验(手写数字识别)
import tensorflow as tf try: import tensorflow.python.keras as keras except: import tensorflow.keras as keras from tensorflow.python.keras import layers mnist = keras.datasets.mnist (x_train,...原创 2019-06-04 01:55:45 · 5682 阅读 · 9 评论