自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(38)
  • 收藏
  • 关注

转载 Loss为NAN的可能原因

前言训练或者预测过程中经常会遇到训练损失值或者验证损失值不正常、无穷大、或者直接nan的情况:遇到这样的现象,通常有以下几个原因导致:梯度爆炸造成Loss爆炸原因很简单,学习率较高的情况下,直接影响到每次更新值的程度比较大,走的步伐因此也会大起来。如下图,过大的学习率会导致无法顺利地到达最低点,稍有不慎就会跳出可控制区域,此时我们将要面对的就是损失成倍增大(跨量级)。另...

2019-10-26 09:24:14 4582

转载 知识蒸馏(Knowledge Distillation)

转载文章原文链接:https://blog.csdn.net/nature553863/article/details/80568658  1、Distilling the Knowledge in a Neural NetworkHinton的文章"Distilling the Knowledge in a Neural Network"首次提出了知识蒸馏(暗知识提取)的概念,通过...

2018-12-25 20:23:55 1286

转载 KL散度

KL散度(Kullback–Leibler divergence)KL散度是度量两个分布之间差异的函数。在各种变分方法中,都有它的身影。 转自:https://zhuanlan.zhihu.com/p/22464760参考:http://www.cnblogs.com/huangshiyu13/p/6898212.html一维高斯分布的KL散度  多...

2018-12-12 14:29:35 2147

转载 深入理解batch normalization批标准化

转载自:https://www.cnblogs.com/guoyaohua/p/8724433.htmlBatch Normalization作为最近一年来DL的重要成果,已经广泛被证明其有效性和重要性。虽然有些细节处理还解释不清其理论原因,但是实践证明好用才是真的好,别忘了DL从Hinton对深层网络做Pre-Train开始就是一个经验领先于理论分析的偏经验的一门学问。本文是对论文《Batc...

2018-12-10 14:15:49 237

原创 POJ3154(Graveyard)

 GraveyardTime Limit: 2000MS   Memory Limit: 65536K Total Submissions: 1452   Accepted: 751   Special Judge  DescriptionProgramming contests became so popular in the year...

2018-09-26 11:15:17 465

原创 HDU oj 1055(Color a Tree 贪心好题)

Color a TreeTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1872    Accepted Submission(s): 654Problem DescriptionBob is very in

2016-05-19 00:20:40 523

原创 HZAU oj 1015(LCS)

1015: LCSTime Limit: 1 Sec  Memory Limit: 128 MBSubmit: 58  Solved: 26[Submit][Status][Web Board]Description   Giving two strings consists of only lowercase letters, find the LCS(L

2016-05-18 23:43:53 618

原创 HDU 5120 Intersection

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5120题意: 给定相同的两个圆环的位置,求圆环的相交面积。思路:分解成圆的相交问题即可。设S(r1, r2)表示圆r1和r2的相交面积。第一个圆环的大小半径分别为R1,r1,第二个为R2,r2;若两圆环无相交部分,则输出0;若两圆环相交,分三种情况:1. 仅仅只有外部

2015-11-03 13:07:13 415

转载 hdu 1098Ignatius's puzzle(math)

Ignatius's puzzleTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7652    Accepted Submission(s): 5326Problem DescriptionIgnatius

2015-10-02 09:33:37 423

原创 UVA1423Guess (dfs,bfs拓扑排序)

题目链接:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=36239题意:给定S( i , j ) , ( i 思路:矩阵中的每个元素都可以看作是序列前缀和之差的结果,若设sum(i)为前i个元素的前缀和,则S( i, j )表示sum(j)- sum(i)的结果的符号,可以从确定关系的两个前缀和间连一

2015-09-24 23:25:20 417

原创 UVA 10054 The Necklace (dfs欧拉回路)

题目链接:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=18806 题意:给一些两色(两色可相同)的珠子,珠子相连的规则是相邻珠子接触部分的颜色相同,求这样的珠子的排列顺序并输出。 思路:比较明显的欧拉回路。把一个珠子的两色连一条无向边,DFS找欧拉回路;同时按照结束访问的顺序记录访问的点,就是欧拉回...

2015-09-23 23:02:14 798 1

原创 UVA 10047 The Monocycle (bfs)

题目链接:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=19491题意:给一个m*n的图和一个五色的轮子,要将其从S点转到T点,每次旋转72°,即每次旋转换一种颜色与地面接触,在每个格子(x , y)上的操作只有三种:1. 往前走 2. 左转3. 右转以上3个操作每个耗时1s,已知在S点时轮子是绿

2015-09-22 20:54:33 412

原创 HDU3534 Tree(树形dp)

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3534TreeTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1144    Accepted Submission(s

2015-09-21 19:00:59 397

原创 UVA1103 || hdu3839 (Ancient Messages)

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3839代码:#include#include#includeusing namespace std;int h, k, cnt, Rec[205][55*8], map[205][55*8];int dx[4] = {1, -1, 0, 0}, dy[4] = {0, 0,

2015-09-16 18:06:47 752

原创 HDU1027(Ignatius and the Princess II)

Ignatius and the Princess IITime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5830    Accepted Submission(s): 3439Problem Description

2015-09-03 23:08:46 1331

原创 HDU1018(Big Number)

Big NumberTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 31253    Accepted Submission(s): 14513Problem DescriptionIn many applicati

2015-09-03 22:53:50 3900

原创 POJ3154(Graveyard)

GraveyardTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 1452 Accepted: 751 Special JudgeDescriptionProgramming contests became so popular in th

2015-09-03 22:47:32 634

原创 HDU1003Max Sum(original) HDU1024Max Sum Plus Plus(upgrading)

Max SumTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 180760    Accepted Submission(s): 42247Problem DescriptionGiven a sequence

2015-09-01 23:52:12 746

原创 HDU3631(Shortest Path)

Shortest PathTime Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4637    Accepted Submission(s): 1105Problem DescriptionWhen YY was a bo

2015-08-25 20:33:47 462

原创 POJ1159(Palindrome)

PalindromeTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 56745 Accepted: 19626DescriptionA palindrome is a symmetrical string, that is, a string read

2015-08-25 20:08:58 2804

原创 POJ1635(Subway tree systems)

Subway tree systemsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 7161 Accepted: 2982DescriptionSome major cities have subway systems in the form of

2015-08-25 00:23:18 481

原创 POJ2572(Seek the Name, Seek the Fame)

Seek the Name, Seek the FameTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 14398 Accepted: 7188DescriptionThe little cat is so famous, that many coup

2015-08-24 17:20:36 315

原创 Uvalive6439(Pasti Pas!)

题意:将给定字符串的部分子串用字符代替,使新得到的串成为回文串,并且得到的回文串长度最大。如: S = `ABCADDABCA',让α=ABCA,β=DD,则新得到的回文串为αβα,长度为3。让α= `A',β = `BC', γ = `D', 则S= αβαγγαβα ,长度为8.思路:方法一:利用string类的加法进行模拟。注意中间部分的特判即可。#inclu

2015-08-24 17:04:23 480

原创 CSU1207(Strictly-increasing sequence)

1207: Strictly-increasing sequenceTime Limit: 1 Sec  Memory Limit: 128 MBSubmit: 371  Solved: 84[Submit][Status][Web Board]Description如果一个序列中任意一项都大于前一项,那么我们就称这个序列为严格递增序列。现在有一个整数序列,

2015-08-22 22:38:24 558

原创 CSU1256(天朝的单行道)

1256: 天朝的单行道Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 216  Solved: 67[Submit][Status][Web Board]Description    在另一个平行宇宙中,有一个神奇的国度名叫天朝。天朝一共有N个城市(标号分别为1, 2, …, N),M条道路,为了方便交通管制,天朝的M

2015-08-18 09:03:27 563

原创 HDU2227(Find the nondecreasing subsequences)

Find the nondecreasing subsequencesTime Limit: 10000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1688    Accepted Submission(s): 612Problem Descr

2015-08-17 19:41:45 446

原创 POJ3038(Blue Jeans)

Blue JeansTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 14301 Accepted: 6366DescriptionThe Genographic Project is a research partnership between IBM a

2015-08-17 19:27:00 568

原创 UVA10534

Wavio is a sequence of integers. It has some interesting properties.• Wavio is of odd length i.e. L = 2 ∗ n + 1.• The first (n + 1) integers of Wavio sequence makes a strictly increasing sequence.

2015-08-17 19:03:38 1267

原创 HDU1875( 畅通工程再续)

Description相信大家都听说一个“百岛湖”的地方吧,百岛湖的居民生活在不同的小岛中,当他们想去其他的小岛时都要通过划小船来实现。现在政府决定大力发展百岛湖,发展首先要解决的问题当然是交通问题,政府决定实现百岛湖的全畅通!经过考察小组RPRush对百岛湖的情况充分了解后,决定在符合条件的小岛间建上桥,所谓符合条件,就是2个小岛之间的距离不能小于10米,也不能大于1000米。当然,为了

2015-08-17 18:18:42 492

转载 oj 中G++和C++区别

oj 中G++和C++区别今天做题目时g++交错误,c++交正确的情况,特意搜了一下。1、输出double类型时,如果采用G++提交,scanf采用%lf,prinf采用%f,否则会报错2、使用GCC/G++的提醒:对于64位整数, long long int 和 __int64 都是支持并且等价的.但是在读和写的时候只支持scanf("%I64d", ...)和pri

2015-08-04 09:13:44 322

原创 POJ2362(DFS)

DescriptionGiven a set of sticks of various lengths, is it possible to join them end-to-end to form a square?InputThe first line of input contains N, the number of test cases. Ea

2015-07-30 11:51:42 617

原创 HDU1501(dfs)

#include#include#include#define maxn 205using namespace std;int len1,len2,len3;int vis[maxn][maxn];char str1[maxn],str2[maxn],str3[maxn*2];bool dfs(int cur1, int cur2, int cur3){ if(cur

2015-07-29 00:16:45 3255

原创 CSU1660(深搜)

思路:对每个点深搜,搜到底,记录每次访问点时的深度,若能找到一个点先后两次访问深度差为K,则输出YES;找不到,则输出NO。#include#include#includeusing namespace std;int tag = 0;int arr[55][5],rec[55];int N,M,K;void dfs(int lastpoint, int x, in

2015-07-28 23:55:05 750

原创 ZOJ1008(深搜)

思路:暴搜,枚举每个位置的卡牌,直到找到结果为止。要注意的是合重,相同的卡牌合并在一起,记录数量,否则很容易超时。#includeusing namespace std;struct Node{ int u,r,d,l,len;}node[25];int n,sum,tmp,tag;int map[5][5];void dfs(int index){

2015-07-28 23:48:22 830

原创 ZOJ1204(dfs)

思路:输出顺序的确定:先对数据进行升序排列,再分别对不同长度的结果进行深搜,同时更新记录输出结果的数组。#include#include#include#define maxn 32using namespace std;int len, tmp,tag=0;int rec[maxn], ans[maxn];void dfs(int start, int sum,

2015-07-28 23:41:20 1027 1

原创 HDU3400(三分)

思路:设a为AB上一点,d为CD上一点,分别对a到A的距离和d到D的距离三分(对应的时间的变化均为凹函数),每次先枚举a的距离,再对d到D 的距离三分出此时对应的最小时间,直到a到A的距离枚举完,得到最小时间。#include#include#include#include#include#define eps 1e-8using namespace std;stru

2015-07-28 23:26:23 615

原创 POJ3258(二分)

思路:二分最短距离,计算对应的移动rocks 的个数。#include#include#define maxn 50005using namespace std;int arr[maxn], rec[maxn], N;int getsum(int x){ int cou = 0,tmp = 0; for(int i = 0; i N; i++)

2015-07-28 23:17:46 442

原创 HDU2141(二分)

DescriptionGive you three sequences of numbers A, B, C, then we give you a number X. Now you need to calculate if you can find the three numbers Ai, Bj, Ck, which satisfy the formula Ai+Bj+Ck

2015-07-28 22:54:17 506

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除