![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
TensorFlow
xytywh
这个作者很懒,什么都没留下…
展开
-
tf.shape(a)和a.get_shape()
tf.shape()中a 数据的类型可以是tensor, list, array,返回结果是一个tensor a.get_shape()中a的数据类型只能是tensor,返回结果是一个元组(tuple)import tensorflow as tfimport numpy as npx=tf.constant([[1,2,3],[4,5,6]]y=[[1,2,3],[4,5,6]]...原创 2018-07-20 16:51:08 · 212 阅读 · 0 评论 -
TensorFlow中的name有什么用
在某些地方,我看到了语法,其中变量用name初始化,有时没有name。 例如:# With namevar = tf.Variable(0, name="counter")# Withoutone = tf.constant(1)那么变量名var和counter有什么区别呢?name参数是可选的(您可以创建带或不带它的变量和常量),并且您在程序中使用的变量不依赖于它。 na...原创 2018-07-12 20:41:27 · 6511 阅读 · 7 评论 -
关于tf.redece_mean中的维度
第一种情况:a=tf.constant([1.0,2.0,3.0])tf.reduce_mean(a)=tf.reduce_mean(a,0)= 2.0tf.reduce_mean(1) 不存在 ,因为a只有一维。第二种情况:a=tf.constant([[1.0,2.0,3.0]])tf.reduce_mean(a)=2.0 (所有数的平均值)tf.reduce_m...原创 2018-07-06 20:46:19 · 200 阅读 · 0 评论 -
保存与加载tensorflow计算图时的错误
保存tensorflow计算图import tensorflow as tf v1 = tf.Variable(tf.constant(1.0,shape = [1]),name = ‘v1’) v2 = tf.Variable(tf.constant(2.0,shape = [1]),name = ‘v2’) result = v1 + v2init_op = tf.global_...原创 2018-06-26 21:37:57 · 538 阅读 · 0 评论 -
parse_softmax_cross_entropy_with_logits和softmax_cross_entropy_with_logits的区别
对于softmax_cross_entropy_with_logits,其logits和labels大小都是[batch_size, num_classes],logits和labels的dtype 都为float16、float32或者float64。对于parse_softmax_cross_entropy_with_logits,其logits大小是[batch_size, num_cla...原创 2018-10-16 17:16:52 · 226 阅读 · 0 评论 -
TensorFlow的静态图与动态图
TensorFlow之前是静态图,即必须把所有的操作以及网络结构定义好,最后才执行,是分开的,后来有了动态图功能,即Eager Execution 。原创 2018-10-23 11:52:02 · 7532 阅读 · 0 评论 -
超详细:win10安装tensorflow-gpu1.8.0完整步骤
fff原创 2018-10-31 20:02:47 · 22604 阅读 · 2 评论