随笔分类 -  深度学习

神经网络&深度学习
摘要: 阅读全文
posted @ 2017-07-22 21:12 debuggor 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-07-22 21:11 debuggor 阅读(176) 评论(0) 推荐(0) 编辑
摘要:1、softmax_cross_entropy_with_logits tf.nn.softmax_cross_entropy_with_logits(logits, labels, name=None) 解释:这个函数的作用是计算 logits 经 softmax 函数激活之后的交叉熵。 对于每个 阅读全文
posted @ 2017-07-22 20:41 debuggor 阅读(730) 评论(0) 推荐(0) 编辑
摘要:1、l2_loss函数 tf.nn.l2_loss(t, name=None) 解释:这个函数的作用是利用 L2 范数来计算张量的误差值,但是没有开方并且只取 L2 范数的值的一半,具体如下: output = sum(t ** 2) / 2 2、tensorflow实现 输入参数: t: 一个Te 阅读全文
posted @ 2017-07-22 20:07 debuggor 阅读(12746) 评论(0) 推荐(0) 编辑
摘要:1、l2_normalize函数 tf.nn.l2_normalize(x, dim, epsilon=1e-12, name=None) 解释:这个函数的作用是利用 L2 范数对指定维度 dim 进行标准化。 比如,对于一个一维的张量,指定维度 dim = 0,那么计算结果为: output = 阅读全文
posted @ 2017-07-22 19:56 debuggor 阅读(5312) 评论(0) 推荐(0) 编辑
摘要:输出结果: bias_add:[[ 2. 0.] [ 3. 1.] [ 4. 2.]]add:[[ 2. 2.] [ 3. 3.] [ 4. 4.]] 阅读全文
posted @ 2017-07-22 17:30 debuggor 阅读(6786) 评论(0) 推荐(0) 编辑
摘要:1、dropout dropout 是指在深度学习网络的训练过程中,按照一定的概率将一部分神经网络单元暂时从网络中丢弃,相当于从原始的网络中找到一个更瘦的网络,这篇博客中讲的非常详细 2、tensorflow实现 用dropout: import tensorflow as tf import nu 阅读全文
posted @ 2017-07-22 17:05 debuggor 阅读(5910) 评论(0) 推荐(0) 编辑
摘要:参考:http://www.jianshu.com/p/e112012a4b2d 阅读全文
posted @ 2017-07-22 16:05 debuggor 阅读(311) 评论(0) 推荐(0) 编辑
摘要:过拟合 在进行数据挖掘或者机器学习模型建立的时候,因为在统计学习中,假设数据满足独立同分布,即当前已产生的数据可以对未来的数据进行推测与模拟,因此都是使用历史数据建立模型,即使用已经产生的数据去训练,然后使用该模型去拟合未来的数据。但是一般独立同分布的假设往往不成立,即数据的分布可能会发生变化(di 阅读全文
posted @ 2017-07-22 11:15 debuggor 阅读(6317) 评论(0) 推荐(0) 编辑
摘要:1、softsign函数 图像 2、tensorflow softsign应用 输出结果: input:[ 0. -1. 2. -30. 30.]output:[ 0. -0.5 0.66666669 -0.96774191 0.96774191] 阅读全文
posted @ 2017-07-22 10:22 debuggor 阅读(2377) 评论(0) 推荐(0) 编辑
摘要:1、elu函数 图像: 2、tensorflow elu应用 输出结果: input:[ 0. -1. 2. -3.]output:[ 0. -0.63212055 2. -0.95021296] 阅读全文
posted @ 2017-07-22 10:16 debuggor 阅读(2459) 评论(2) 推荐(0) 编辑
摘要:1、softplus函数表达式 图像: 2、tensorflow 举例 输出结果: input:[ 0. 1. 2. 3.]output:[ 0.69314718 1.31326163 2.12692809 3.04858732] 阅读全文
posted @ 2017-07-22 10:02 debuggor 阅读(1788) 评论(0) 推荐(0) 编辑
摘要:1.sigmoid函数 S(x)=1/(1+exp(-x)) 导数为:S(x)*(1-S(x))。 这个数值不会超过0.25.。通过sigmoid函数计算的函数值在0~1之间,如果神经网络的层数很多,如果每一层的激励函数采用sigmoid函数,就会产生梯度弥散的问题。因为利用BP函数更新参数的时候, 阅读全文
posted @ 2017-07-22 00:51 debuggor 阅读(885) 评论(0) 推荐(0) 编辑
摘要:1、tanh()函数 tanh是双曲函数中的一个,tanh()为双曲正切。 双曲正切函数的导数公式: 2、tensorflow tanh()例子 import tensorflow as tf input=tf.constant([1,2,3,4],dtype=tf.float32) #在tenso 阅读全文
posted @ 2017-07-22 00:38 debuggor 阅读(1317) 评论(0) 推荐(0) 编辑
摘要:tf.nn.conv2d(input, filter, strides, padding, use_cudnn_on_gpu=None, data_format=None, name=None) 官方教程说明: 给定四维的input和filter tensor,计算一个二维卷积 input: A T 阅读全文
posted @ 2017-07-22 00:00 debuggor 阅读(15134) 评论(0) 推荐(1) 编辑
摘要:tf.nn.conv2d是TensorFlow里面实现卷积的函数,参考文档对它的介绍并不是很详细,实际上这是搭建卷积神经网络比较核心的一个方法,非常重要 tf.nn.conv2d(input, filter, strides, padding, use_cudnn_on_gpu=None, name 阅读全文
posted @ 2017-07-21 21:14 debuggor 阅读(1910) 评论(0) 推荐(0) 编辑
摘要:1、最大池化 max pooling是CNN当中的最大值池化操作,其实用法和卷积很类似。 tf.nn.max_pool(value, ksize, strides, padding, name=None) 参数是四个,和卷积很类似: 第一个参数value:需要池化的输入,一般池化层接在卷积层后面,所 阅读全文
posted @ 2017-07-21 19:15 debuggor 阅读(1203) 评论(0) 推荐(0) 编辑
摘要:1、Relu激活函数 Relu激活函数(The Rectified Linear Unit)表达式为:f(x)=max(0,x)。 2、tensorflow实现 输出为: [[ 0. 10. 0.] [ 0. 2. 0.]] 阅读全文
posted @ 2017-07-21 18:49 debuggor 阅读(4169) 评论(0) 推荐(0) 编辑
摘要:1、函数 函数:f(z) = 1 / (1 + exp( − z)) 导数:f(z)' = f(z)(1 − f(z)) 2、tensorflow实现 输出为: [[ 5.00000000e-01 9.99954581e-01 4.53978719e-05] [ 7.31058598e-01 8.8 阅读全文
posted @ 2017-07-21 18:37 debuggor 阅读(10935) 评论(0) 推荐(0) 编辑
摘要:恢复内容开始 1、softmax函数 2、tensorflow实现例子 输出为: [[ 0.2 0.2 0.2]][[ 0.33333334 0.33333334 0.33333334]][1 3] 输出为: [[ 0.2 0.2 0.2] [ 1. 2. 3. ]][[ 0.33333334 0. 阅读全文
posted @ 2017-07-21 18:12 debuggor 阅读(256) 评论(0) 推荐(0) 编辑