Tensorflow学习
文章平均质量分 51
wanglitao588
生的平凡,活的潇洒!
展开
-
Tensorflow 变量命名空间及变量重用
变量命名空间 tf里面的命名空间和C++的命名空间基本上是同一种东西,能够更好的管理模块的变量(特别是将来会重用到的变量)。最简单的用法就是 with tf.variable_scope("layer1"): # 这里就创建了一个名叫layer1的变量空间 v = tf.get_variable("vector", [3], initializer=tf.random_norm转载 2017-08-09 11:22:26 · 1745 阅读 · 0 评论 -
tensorflow学习:tf.nn.softmax_cross_entropy_with_logits()
tf.nn.softmax_cross_entropy_with_logits(_sentinel=None, labels=None, logits=None,dim=-1, name=None) 参数:_sentinal:一般不用 labels:神经网络期望的输出,它的shape是[batch_size, num_classes]。 logits:神经网络最原创 2017-08-09 22:11:41 · 493 阅读 · 0 评论 -
TensorFlow相关的精彩问答
转自博客园,原文链接:http://www.cnblogs.com/iyulang/p/6586866.html 引言:自TensorFlow于2015年底正式开源,距今已有一年多,不久前,TensorFlow正式版也发布了。这期间TensorFlow不断给人以惊喜,推出了分布式版本,服务框架TensorFlowServing,可视化工具TensorFlow,上层封装TF.Learn转载 2017-08-10 09:47:38 · 517 阅读 · 0 评论 -
tensorflow学习:错误 InternalError: Dst tensor is not initialized
今天在jupyter notebook上跑一个tensorflow 的CNN程序时,出现了一个错误,记录如下: 错误:InternalError: Dst tensor is not initialized. 分析:出现这个错误一般是GPU内存耗尽,挂在后台进程中的IPython内核会这样做 解决办法:运行程序之前,先运行export CUDA_VISIBLE_DEVIC原创 2017-08-10 09:57:12 · 29939 阅读 · 6 评论 -
tensorflow学习: 卷积函数
今天学习了tensorflow的卷积函数,做笔记如下: 1 tf.nn.conv2d(input, filter, strides, padding, use_cudnn_on_gpu=None, name=None) 参数: input:四维张量,[batch, in_height, in_width, in_channels] filter:[f原创 2017-08-08 11:24:40 · 685 阅读 · 0 评论 -
tensorflow学习:tf.nn.conv2d 和 tf.layers.conv2d
看了很多tensorflow卷积的例子,有的用了tf.nn.conv2d,有的用了tf.layers.conv2d,那么这两个究竟有啥不同呢? tf.layers.conv2d(inputs, filters, kernel_size, strides=(1,1), padding='valid', data_format原创 2017-08-14 15:38:35 · 30083 阅读 · 11 评论