TensorFlow学习

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/kl1411/article/details/82983932

桌面云上tensorflow1.2,linux服务器上tensorflow1.4

说明文档
https://www.tensorflow.org/get_started/?hl=zh-cn

windows下安装
pip install tensorflow 
来自 <https://blog.csdn.net/zhuzhishi2042/article/details/72888312> 

教程
https://morvanzhou.github.io/tutorials/machine-learning/tensorflow/

GPU使用
http://www.tensorfly.cn/tfdoc/how_tos/using_gpu.html

LeNet
https://blog.csdn.net/d5224/article/details/68928083
详细讲解
https://blog.csdn.net/yanzi6969/article/details/78019683
代码实现
https://blog.csdn.net/jeryjeryjery/article/details/79426907
https://blog.csdn.net/VictoriaW/article/details/72354307

tensorflow车牌识别
https://blog.csdn.net/ShadowN1ght/article/details/78571187

官方中文文档
http://www.tensorfly.cn/tfdoc/get_started/introduction.html

tf.nn.conv2d(input, filter, strides, padding, use_cudnn_on_gpu=None, name=None)
第一个参数input:[batch, in_height, in_width, in_channels]  batch为-1表示自动
第二个参数filter:[filter_height, filter_width, in_channels, out_channels]
第三个参数strides:一个一维的向量,长度4,其规定前后必须为1,所以我们可以改的是中间两个数,中间两个数分别代表了水平滑动和垂直滑动步长值。[1,stride,stride,1]
第四个参数padding:只能是"SAME","VALID"其中之一
第五个参数:use_cudnn_on_gpu:bool类型,是否使用cudnn加速,默认为true
结果返回一个Tensor,这个输出,就是我们常说的feature map
https://zhuanlan.zhihu.com/p/26139876

tf.nn.max_pool(value, ksize, strides, padding, name=None)
第一个参数value:需要池化的输入,一般池化层接在卷积层后面,所以输入通常是feature map,依然是[batch, height, width, channels]这样的shape
第二个参数ksize:池化窗口的大小,取一个四维向量,一般是[1, height, width, 1],因为我们不想在batch和channels上做池化,所以这两个维度设为了1
第三个参数strides:和卷积类似,窗口在每一个维度上滑动的步长,一般也是[1, stride,stride, 1]
第四个参数padding:和卷积类似,可以取'VALID' 或者'SAME'
返回一个Tensor,类型不变,shape仍然是[batch, height, width, channels]这种形式
https://blog.csdn.net/mao_xiao_feng/article/details/53453926
padding='SAME'
https://www.cnblogs.com/qggg/p/6832705.html

在卷积核移动逐渐扫描整体图时候,因为步长的设置问题,可能导致剩下未扫描的空间不足以提供给卷积核的大小扫描,比如有图大小为5*5,卷积核为2*2,步长为2,卷积核扫描了两次后,剩下一个元素,不够卷积核扫描了,这个时候就在后面补零,补完后满足卷积核的扫描,这种方式就是same。如果说把刚才不足以扫描的元素位置抛弃掉,就是valid方式。
https://blog.csdn.net/qq_28752595/article/details/80059302

常量(tf.constant)与变量(tf.Varialbe)
https://blog.csdn.net/yjk13703623757/article/details/77075711
tf.constant(value, dtype=None, shape=None, name='Const', verify_shape=False)
https://www.jianshu.com/p/474de963b46f

ValueError: At least two variables have the same name: Variable_3
解决:tf.reset_default_graph()
https://blog.csdn.net/ztf312/article/details/72854906

tf.nn.embedding_lookup
https://www.jianshu.com/p/677e71364c8e

猜你喜欢

转载自blog.csdn.net/kl1411/article/details/82983932