![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
tensorflow
love_image_xie
这个作者很懒,什么都没留下…
展开
-
tensorflow: name_scope和variable_scope
两个都是用来指定命名空间的.区别1:name_scope不会为变量增添原始命名空间,variable_scope会给定义的变量增加原始命名空间,举例如下:with tf.name_scope('V1'): a1=tf.get_variable(name='a1',shape=[1],initializer=tf.constant_initializer(1)) pri...转载 2018-12-04 11:30:21 · 117 阅读 · 0 评论 -
tensorflow: tf.nn.conv2d和tf.layers.conv2d区别
tf.nn.conv2d(input, filter, strides, padding, use_cudnn_on_gpu=None, data_format=None, name=None)input: 输入数据,是一个Tensor,shape为[batch, in_height, in_width, in_channels]filter: 与input一样的张量,[filter_hei...原创 2018-12-02 18:00:15 · 909 阅读 · 0 评论 -
tensorflow: tf.Variable()和tf.get_variable()区别
tf.Variable()定义一个变量tf.Variable(1,name='a1')tf.Variable(tf.constant(1),name='a2')tf.Variable(tf.random_normal(shape=[2,3],mean=0,stddev=1),name='a3')tf.Variable(tf.ones(shape=[3,3]),name='a4')...原创 2018-12-02 18:41:18 · 134 阅读 · 0 评论 -
tensorflow操作mnist数据
from tensorflow.examples.tutorials.mnist import input_dataimport tensorflow as tfmnist = input_data.read_data_sets('data/mnist',one_hot=True)# 打印“Training data size: 55000”print("Training data s...原创 2018-11-30 21:55:48 · 84 阅读 · 0 评论 -
tensorflow layers模块操作
tf.layers模块提供的方法有:input(...): 实例化一个输入Tensor,作为一个神经网络的输入 average_pooling1d(...): 一维平均池化层 average_pooling2d(...): 二维平均池化层 average_pooling3d(...): 三维平均池化层 batch_normalization(...): BN(batch normali...原创 2018-12-01 11:24:29 · 381 阅读 · 0 评论 -
tensorflow: 图像操作
调整图像大小:tf.image.resize_imagestf.image.resize_areatf.image.resize_bicubictf.image.resize_bilineartf.image.resize_nearest_neighborresize_images是总接口,接口参数为:tf.image.resize_images(images,size,...原创 2018-12-01 12:06:10 · 325 阅读 · 0 评论