![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
TensorFlow
如是雨林
熟悉java,嵌入式C语言和操作系统
展开
-
TensorFlow学习——random_normal,truncated_normal,random_uniform
下面的函数可以用于TensorFlow初始化权重: tf.random_normal(shape,mean=0.0,stddev=1.0,dtype=tf.float32,seed=None,name=None) tf.truncated_normal(shape, mean=0.0, stddev=1.0, dtype=tf.float32, seed=None, name=None) t...原创 2018-09-23 17:50:45 · 250 阅读 · 0 评论 -
TensorFlow学习——tf.nn.max_pool实现池化操作
转自:tf.nn.max_pool实现池化操作 max pooling是CNN当中的最大值池化操作,其实用法和卷积很类似 tf.nn.max_pool(value, ksize, strides, padding, name=None) 参数是四个,和卷积很类似: 第一个参数value:需要池化的输入,一般池化层接在卷积层后面,所以输入通常是feature map,依然是[batch, h...转载 2018-09-23 18:49:06 · 1240 阅读 · 0 评论 -
TensorFlow学习——tf.placeholder
函数原型:tf.placeholder(dtype, shape=None, name=None) 参数解释: dtype: The type of elements in the tensor to be fed.(参数类型) shape: The shape of the tensor to be fed (optional). If the shape is not specifi...原创 2018-09-20 18:38:48 · 352 阅读 · 0 评论 -
TensorFlow学习——tf.Variable()
tf.Variable(initializer,name):参数initializer是初始化参数,name是可自定义的变量名称 主要在于一些可训练变量(trainable variables),比如模型的权重(weights,W)或者偏执值(bias)。 例子: W = tf.Variable(tf.zeros([784, 10])) b = tf.Variable(tf.zeros([...原创 2018-09-20 18:56:12 · 2595 阅读 · 0 评论 -
Tensorflow学习——如何安装TensorFlow
首先选择版本问题: TensorFlow有两个版本,CPU和GPU,如果你有一个强大的显卡,就安装GPU版,具体如何安装这里不介绍了。 可以参考:https://blog.csdn.net/lanchunhui/article/details/54964064 这里提一下,大部分博客推荐用anaconda安装,这个是没有问题的,但是安装完之后,就会发现在IDE(如Pycharm)中,impo...原创 2018-09-21 20:55:06 · 443 阅读 · 0 评论 -
pytorch Rnn输出大小和教程代码不一样解惑
在学习pytorch时,按照教程搭建了LSTM网络,去识别MINST数据集。 代码如下: import torch import torch.nn as nn import torchvision import torchvision.transforms as transforms # Device configuration device = torch.device('cuda'...原创 2019-03-03 21:12:17 · 913 阅读 · 0 评论