tensorflow
全意
来点不一样的
展开
-
pycharm 启动导入 tensorflow 失败问题
遇到一个奇怪的问题: 环境: Ubuntu 16.04 tensorflow 1.9.0 tensorflow安装无误,并可以在命令行启动,但是在Pycharm中报错: ImportError: libcublas.so.9.0: cannot open shared objectfile: No such file在pycharm中尝试运行:import osos...原创 2018-07-14 14:47:48 · 2169 阅读 · 1 评论 -
Tensorflow编译相关
clang 编译器:clang是LLVM编译器工具集的一个用于编译C、C++、Objective-C的前端。LLVM项目的目标是提供一个GNU编译器套装(gcc)的替代品,由苹果公司的赞助开发,其源代码授权采用的是类BSD的伊利诺伊大学厄巴纳-香槟分校开源码许可。相比于gcc,clang 具有如下优势:编译速度更快:在某些平台上,clang 的编译速度要明显快于gcc。占用内存更小...原创 2018-07-12 21:50:19 · 432 阅读 · 0 评论 -
关于Bias的问题 Should the convolution layers have biases?
You can access to [https://github.com/KaimingHe/deep-residual-networks/issues/10#issuecomment-194037195]在复现WRN网络时,发现Resnet部分没有使用bias观点: Biases are in the BN layers that follow. BN层的作用相当于bias, 因此...原创 2018-03-28 20:27:56 · 940 阅读 · 0 评论 -
简单理解TensorFlow textlinereader的例子
import tensorflow as tfimport numpy as npdef main(): filename_queue = tf.train.string_input_producer(["test.txt", "test2.txt"], num_epochs=1) reader = tf.TextLineReader() key, value = r...原创 2017-09-10 00:19:03 · 5655 阅读 · 2 评论 -
[tensorflow]sparse_softmax_cross_entropy_with_logits 与 softmax_cross_entropy_with_logits的区别
原函数: tf.nn.sparse_softmax_cross'_entropy_with_logits(logits=net, labels=y) tf.nn.softmax_cross_entropy_with_logits(logits=net, labels=y2)sparse_softmax_cross_entropy_with_logits中 lables接受直接的数字标签 ...原创 2018-03-06 14:18:23 · 6158 阅读 · 1 评论 -
TensorFlow 读取数据的几种方法
TensorFlow 输入数据的方式# 从 filename_queue = tf.train.string_input_producer(filenames) 开始reader = tf.XXXRecoder()reader.read(filename_queue)tf.train.batch([example, label], batch_size=batch_size, ca...原创 2018-03-27 12:30:07 · 404 阅读 · 0 评论 -
[tensorflow] 得出预测结果 tf.nn.in_top_k()
import tensorflow as tfimport numpy as nplogits = tf.placeholder(tf.float32, shape=(None,10))labels = tf.placeholder(tf.int32, shape=(None))top_k_op = tf.nn.in_top_k(logits, labels,1)a = np.arra...原创 2018-03-28 15:32:25 · 1626 阅读 · 0 评论 -
[Tensorflow] 参数保存剖析
在tf.global_variables() 里可以看到所有参数 print( tf.global_variables() ) print( sess.run(tf.global_variables() ) 显示其中的数值这里的名称 'Layer1' 是通过tf.variable_scope() 设置, weights是variable的name,[<tf.Variable ...原创 2018-08-26 21:59:45 · 537 阅读 · 0 评论