码迷,mamicode.com
首页 > 其他好文 > 详细

0.tensorflow——常用说明

时间:2019-11-15 20:41:42      阅读:65      评论:0      收藏:0      [点我收藏+]

标签:htm   ide   区间   none   red   oat   kernel   nbsp   max   

1.tf

tf.placeholder(tf.float32,shape=[None,inputSize])#类似于一个float32的声明
tf.reduce_mean()#求均值,可以是不同维度
tf.cast()#
tf.argmax()#返回最大的那个数值所在的下标https://blog.csdn.net/qq575379110/article/details/70538051/

2.nn

tf.nn.softmax()#Softmax函数,将张量的每个元素缩放到(0,1)区间且和为1。
tf.nn.relu()#计算激活函数 relu,即 max(features, 0)。将大于0的保持不变,小于0的数置为0。
tf.nn.conv2d()#2D卷积https://blog.csdn.net/SHU15121856/article/details/88956545
"""2维的卷积层,用于图片的卷积"""
# 输入图像的通道数=1(灰度图像),卷积核的种类数=3
# 卷积核的shape是3乘3的,扫描步长为1,不加padding
layer = nn.Conv2d(1, 3, kernel_size=3, stride=1, padding=0)

 

3.

 

资料

1.图像识别http://rodrigob.github.io/are_we_there_yet/build/classification_datasets_results.html

2.TF教程http://www.tensorfly.cn/tfdoc/tutorials/mnist_beginners.html

0.tensorflow——常用说明

标签:htm   ide   区间   none   red   oat   kernel   nbsp   max   

原文地址:https://www.cnblogs.com/yrm1160029237/p/11869058.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!