一、损失函数(loss) [前向传播的预测值y与已知答案y_的差距]: 1.优化目标:使loss达到最小值。 2.优化方法:均方误差(mse) 交叉熵(ce) 自定义 详解: 1.均方误差mse: 公式: 函数:loss_mse = tf.reduce_mean(tf.square(y_ - y)) ...
分类:
其他好文 时间:
2018-09-25 17:27:00
阅读次数:
225
题目如下: 解题思路:天坑题,不在于题目多难,而是要理解题意。题目中有两点要特别注意,一是“You choose a destination square S with number x+1, x+2, x+3, x+4, x+5, or x+6, provided this number is < ...
分类:
其他好文 时间:
2018-09-25 13:20:44
阅读次数:
195
题目大意:给你一个序列,你可以在序列中任选一个子序列,求子序列每一项的积是一个平方数的方案数。 1<=a[i]<=70 因为任何一个大于2的数都可以表示成几个质数的幂的乘积 所以我们预处理70以内的质数,把它作为二进制状压的状态,每个在序列中出现数Hash一下,组合数推一下 所以把奇次幂的状态表示为 ...
分类:
其他好文 时间:
2018-09-24 23:25:24
阅读次数:
192
题目大意:让你在1~n中选择不多于k个数(n,k<=500),保证它们的乘积不能被平方数整除。求选择的方案数 因为质数的平方在500以内的只有8个,所以我们考虑状压 先找出在n以内所有平方数小于等于n的质数,然后我们把它们作为状压的状态 然后要对每个小于n数进行状压,如果它不能被它能被质数的平方整除 ...
分类:
其他好文 时间:
2018-09-24 23:23:35
阅读次数:
209
概念 均方差 MSE mean square error 平均绝对差 MAE mean absolute error 交叉损失熵 cross entropy 欠拟合:训练集和测试集性能接近 过拟合:训练集远远高于测试集性能 有监督学习算法比较 knn 调节:n_neighbors 优点:模型很容易解 ...
分类:
编程语言 时间:
2018-09-24 13:51:44
阅读次数:
158
Allen wants to enter a fan zone that occupies a round square and has nn entrances. There already is a queue of aiai people in front of the ii-th entra ...
分类:
其他好文 时间:
2018-09-24 11:15:04
阅读次数:
187
Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to n. Example 1: Example 2: ...
分类:
其他好文 时间:
2018-09-23 22:41:01
阅读次数:
475
"原题:279. Perfect Squares" Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to n. ...
分类:
其他好文 时间:
2018-09-20 16:02:50
阅读次数:
151
转自:https://blog.csdn.net/shuaishuaidewo/article/details/81136088 import lombok.extern.slf4j.Slf4j; import okhttp3.*; /** * 需要注入依赖 * * com.squareup.okh... ...
分类:
Web程序 时间:
2018-09-18 00:19:46
阅读次数:
546
卡方分布—chi-square distribution, χ2-distribution: 若k个独立的随机变量Z1, Z2,..., Zk 满足标准正态分布 N(0,1) , 则这k个随机变量的平方和: 为服从自由度为k的卡方分布,记作: 或者 卡方检验—χ2检验是以χ2分布为基础的一种假设检验 ...
分类:
其他好文 时间:
2018-09-14 23:13:21
阅读次数:
480