博客园  :: 首页  :: 新随笔  :: 管理

2020年2月23日

摘要: 减小过拟合的几种方法: 我们建一个三层的网络,并给他加上dropout 测试一下训练20次的准确率 import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data #载入数据集 mnist=inpu 阅读全文

posted @ 2020-02-23 23:56 wsg_blog 阅读(851) 评论(0) 推荐(0) 编辑

摘要: 二次代价函数 $C = \frac{1} {2n} \sum_{x_1,...x_n} \|y(x)-a^L(x) \|^2$ 其中,C表示代价函数,x表示样本,y表示实际值,a表示输出值,n表示样本的总数;整个的意思就是把n个y-a的平方累加起来,再除以2n求一下均值。 为简单起见,先看下 一个样 阅读全文

posted @ 2020-02-23 00:53 wsg_blog 阅读(3456) 评论(0) 推荐(0) 编辑