惯例先展示函数:

tf.nn.conv2d(input, filter, strides, padding, use_cudnn_on_gpu=None, name=None)

  除去name参数用以指定该操作的name,与方法有关的一共五个参数:

    • input: 
      指需要做卷积的输入图像,它要求是一个Tensor,具有[batch, in_height, in_width, in_channels]这样的shape,具体含义是[训练时一个batch的图片数量, 图片高度, 图片宽度, 图像通道数],注意这是一个4维的Tensor,要求类型为float32和float64其中之一

    • filter: 
      相当于CNN中的卷积核,它要求是一个Tensor,具有[filter_height, filter_width, in_channels, out_channels]这样的shape,具体含义是[卷积核的高度,卷积核的宽度,图像通道数,卷积核个数],要求类型与参数input相同,有一个地方需要注意,第三维in_channels,就是参数input的第四维。【有时候也叫ksize或卷积核】

    • strides:卷积时在图像每一维的步长,这是一个一维的向量,长度4。【注意:一般两边为1.形如[1,height,weight,1]】。

    • padding: 
      string类型的量,只能是”SAME”,”VALID”其中之一,这个值决定了不同的卷积方式【same:不够还加。valid:不够舍弃。】

    • use_cudnn_on_gpu: 
      bool类型,是否使用cudnn加速,默认为true

tf.nn.conv2d()需要搞清楚的几个变量。的更多相关文章

  1. tf.nn.conv2d函数和tf.nn.max_pool函数介绍

    tf.nn.conv2d(input, filter, strides, padding, use_cudnn_on_gpu=None, name=None) 介绍参数: input:指卷积需要输入的 ...

  2. TF-卷积函数 tf.nn.conv2d 介绍

    转自 http://www.cnblogs.com/welhzh/p/6607581.html 下面是这位博主自己的翻译加上测试心得 tf.nn.conv2d是TensorFlow里面实现卷积的函数, ...

  3. tf.nn.conv2d 和 tf.nn.max_pool 中 padding 分别为 'VALID' 和 'SAME' 的直觉上的经验和测试代码

    这个地方一开始是迷糊的,写代码做比较分析,总结出直觉上的经验. 某人若想看精准的解释,移步这个网址(http://blog.csdn.net/fireflychh/article/details/73 ...

  4. tf.nn.conv2d。卷积函数

    tf.nn.conv2d是TensorFlow里面实现卷积的函数,参考文档对它的介绍并不是很详细,实际上这是搭建卷积神经网络比较核心的一个方法,非常重要 tf.nn.conv2d(input, fil ...

  5. tf.nn.conv2d

    tf.nn.conv2d(input, filter, strides, padding, use_cudnn_on_gpu=None, name=None) input: 指需要做卷积的输入图像,它 ...

  6. 深度学习原理与框架-Tensorflow卷积神经网络-卷积神经网络mnist分类 1.tf.nn.conv2d(卷积操作) 2.tf.nn.max_pool(最大池化操作) 3.tf.nn.dropout(执行dropout操作) 4.tf.nn.softmax_cross_entropy_with_logits(交叉熵损失) 5.tf.truncated_normal(两个标准差内的正态分布)

    1. tf.nn.conv2d(x, w, strides=[1, 1, 1, 1], padding='SAME')  # 对数据进行卷积操作 参数说明:x表示输入数据,w表示卷积核, stride ...

  7. tf.nn.conv2d 参数介绍

    tf.nn.conv2d是TensorFlow里面实现卷积的函数,参考文档对它的介绍并不是很详细,实际上这是搭建卷积神经网络比较核心的一个方法,非常重要 tf.nn.conv2d(input, fil ...

  8. tf入门-tf.nn.conv2d是怎样实现卷积的?

    转自:https://blog.csdn.net/mao_xiao_feng/article/details/78004522 实验环境:tensorflow版本1.2.0,python2.7 介绍 ...

  9. tf.nn.conv2d实现卷积的过程

    #coding=utf-8 import tensorflow as tf #case 2 input = tf.Variable(tf.round(10 * tf.random_normal([1, ...

随机推荐

  1. 48. Rotate Image (Array)

    You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). ...

  2. spring框架 构造方法注入

    在resources里面新建applicationContext.xml 配置如下: <?xml version="1.0" encoding="UTF-8&quo ...

  3. Centos7 下mariadb安装

    1.创建 /etc/yum.repos.d/MariaDB.repo vim  /etc/yum.repos.d/MariaDB.repo 添加如下内容: [mariadb]name=MariaDB ...

  4. ROS标定IDS相机

    参考 ROS 相机标定http://blog.csdn.net/ArtistA/article/details/51125560 ROS里的标定程序只要使用了OPNCV的标定程序: opencv 相机 ...

  5. import c++ project to eclipse cdt with exiting makefile

    Step 2: You are now ready to build your project. To build your project, select Project > Build Pr ...

  6. Linux TCP拥塞控制算法原理解析

    这里只是简单梳理TCP各版本的控制原理,对于基本的变量定义,可以参考以下链接: TCP基本拥塞控制http://blog.csdn.net/sicofield/article/details/9708 ...

  7. USB相关注册表

    计算机\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{ SYSTEM\\CurrentControlSet\\Control\\ ...

  8. [Jmeter]Jmeter环境搭建

    Jmeter环境搭建 1.  拷贝 \\szpc1450\apache-jmeter-2.7 整个目录到本机(我是放在D盘,以下路径说明以D盘为例) 2.  拷贝\\szpc1450\Tools\au ...

  9. Linux下删除文件系统空间不释放的问题

    删除了Linux下的一个文件,但是系统空间并没有被释放. 如下:/home/hadmin/data/hadoop 使用了1.3T的空间,但是实际只使用了600多G 原因是我删除了一个600多G的文件, ...

  10. Bitmap Images and Image Masks

    [Bitmap Images and Image Masks] Bitmap images and image masks are like any drawing primitive in Quar ...