- 博客(102)
- 收藏
- 关注
原创 深度学习解释:Precision、Recall、IoU、Ap/mAp
深度学习的指标都是(APAverage Precision)二分类情况下的Precision(查重率)和Recall(查全率)对于二分类问题,可将样例根据其真实类别与学习器预测类别的组合划分为真正例(true positive)、假正例(false positive)、真反例(true negative)、假反例(false negative)四种情形,令TP、FP、TN、FN分别表示其对应的样例数,则显然有TP+FP+TN+FN=样例总数。TP = T+P , 前面的字母代表此次预测是否正确,后面
2021-03-04 15:04:18
3109
2
原创 Pytorch安装步骤
第一步:安装Anaconda清华镜像安装Anaconda(速度更快): https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/选择一个合适的版本第二步:安装Pytorch命令行输入:conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/再输入: conda install pytorch torchvision安装过程
2020-09-06 11:38:20
317
原创 a deep leaning
(1)设计了新的搜索空间,即NASNet search space,并在实验中搜索得到最优的网络结构NASNet(2)提出新的正则化技术,ScheduledDropPath,是DropPath方法的改进版,可以大大提高了模型的泛化能力。DropPath方法在训练过程中以随机概率p进行drop,该概率训练中保持不变。而ScheduledDropPath方法在训练过程线性的提高随机概率p。...
2019-05-14 09:47:38
267
原创 Java set重写排序
关于Comparator方法如何理解排序① jdk官方默认是升序,是基于:< return -1= return 0> return 1如果要想package SetTest;import java.util.Comparator;import java.util.Iterator;import java.util.LinkedList;import java....
2019-05-08 08:22:39
767
原创 JAVA--set用法
Set集合的特点:不能存储相同的元素。同时因为其是一个抽象的接口:所以不能直接实例化一个set对象。(Set s = new Set() )错误该接口主要继承于Collections接口,所以具有Collection的一些常见的方法。常见的方法:1 add( ) 向集合中添加元素2 clear( ) 去掉集合中所有的元素3 contains( ) ...
2019-03-28 20:57:56
433
原创 埃氏筛法(素数)
来源埃氏筛法(素数筛)埃式筛法:给定一个正整数n(n<=10^6),问n以内有多少个素数?做法:做法其实很简单,首先将2到n范围内的整数写下来,其中2是最小的素数。将表中所有的2的倍数划去,表中剩下的最小的数字就是3,他不能被更小的数整除,所以3是素数。再将表中所有的3的倍数划去……以此类推,如果表中剩余的最小的数是m,那么m就是素数。然后将表中所有m的倍数划去,像这样反复操作,就能依...
2019-03-21 20:35:17
2066
原创 Shopping 6834(贪心)
6834 ShoppingYour friend will enjoy shopping. She will walk through a mall along a straight street, where N individualshops (numbered from 1 to N) are aligned at regular intervals. Each shop has one...
2019-03-19 20:03:34
257
原创 Bit String Reordering 6832(模拟)
You have to reorder a given bit string as specified. The only operation allowed is swapping adjacentbit pairs. Please write a program that calculates the minimum number of swaps required.The initial...
2019-03-19 19:58:59
339
原创 拓扑排序那点事(vector+priority_queue)
一 定义对一个有向无环图(Directed Acyclic Graph简称DAG)G进行拓扑排序,是将G中所有顶点排成一个线性序列,使得图中任意一对顶点u和v,若边(u,v)∈E(G),则u在线性序列中出现在v之前。通常,这样的线性序列称为满足拓扑次序(Topological Order)的序列,简称拓扑序列。简单的说,由某个集合上的一个偏序得到该集合上的一个全序,这个操作称之为拓扑排序。 [1...
2019-03-12 20:23:40
392
原创 C++STL之双端队列Deque
deque双端队列容器与vector很类似,采用线性表顺序存储结构。但与vector区别,deque采用分块的线性存储结构来存储数据,每块的大小一般为512B,将之称为deque块,所有的deque块使用一个map块进行管理,每个map数据项记录各个deque块的首地址,这样的话,deque块在头部和尾部都可以插入和删除。而不需要移动任何元素,而不需要移动其他元素(使用push_back()方法在...
2019-03-06 20:55:09
576
原创 Dbutils常见方法
1.mysql jdbc: 复习 是一种规范,规范sum公司制定,使用规范,又实现类数据库厂家,驱动 jdbc操作数据库步骤: 1.导入驱动包 ,加载驱动 2.创建连接对象。需要数据库信息 driver url username pwd 配置文件存储数据: a.文件后缀名 .properties b.文件后缀名 ...
2018-12-22 14:00:09
1120
原创 KMP详解
KMP详解A - Number SequenceDescriptionGiven two sequences of numbers : a[1], a[2], … , a[N], and b[1], b[2], … , b[M] (1 <= M <= 10000, 1 <= N <= 1000000). Your task is to find a number K ...
2018-11-29 20:10:11
273
原创 字典树
一、定义字典树(Trie)可以保存一些字符串->值的对应关系。基本上,它跟 Java 的 HashMap 功能相同,都是 key-value 映射,只不过 Trie 的 key 只能是字符串。 Trie 的强大之处就在于它的时间复杂度。它的插入和查询时间复杂度都为 O(k) ,其中 k 为 key 的长度,与 Trie 中保存了多少个元素无关。Hash 表号称是 O(1) 的,但在计算...
2018-11-27 20:10:54
462
原创 第十三周比赛
6822 Black and white stonesShagga and Dolf like to play a game with stones, each of which is either black or white. At the beginningof the game, Dolf arranges all the stones in a single line from le...
2018-11-27 19:52:59
206
原创 Boggle(DFS)
Boggle is a game in which 16 dice with letters on each side are placed into a 4 × 4 grid. Players thenattempt to find words using letters from adjacent dice. You must write a program to find words fr...
2018-11-23 21:00:28
592
1
原创 Dance Recital
The Production Manager of a dance company has been tasked with determining the cost for the seasonaldance recital. Because of their exceptional skills, many dancers will perform in more than one rout...
2018-11-08 21:02:55
291
原创 H - Hotel Rewards(优先队列)
You are planning to spend your holidays touring Europe, staying each night in a different city for Nconsecutive nights. You have already chosen the hotel you want to stay in for each city, so you kno...
2018-10-30 20:50:12
417
原创 第八周组队赛
K Video Posts此题链接题意:就是看能否均分,是的话就Yes,然后输出可以由几个数组成,不是就No#include &lt;iostream&gt;#include &lt;cstdio&gt;#include &lt;cstring&gt;#include &lt;cstdlib&gt;#include &lt;cmath&a
2018-10-26 19:01:20
155
原创 逆序对(归并排序)
Description在这个问题中,你需要分析一个对n个不同数排序的算法。该算法主要通过交换相邻数直到序列有序(升序)。比如:对输入序列 9 1 0 5 4经过一系列交换后变成有序序列 0 1 4 5 9你的任务是计算将序列变成有序最少需要经过多少次交换。Input输入包含多组测试数据。每组第一个是整数n<...
2018-10-21 16:15:02
7432
1
原创 卡特兰数(JAVA大数)Buy the Ticket
DescriptionThe “Harry Potter and the Goblet of Fire” will be on show in the next few days. As a crazy fan of Harry Potter, you will go to the cinema and have the first sight, won’t you?Suppose the c...
2018-10-19 20:22:09
244
原创 优先队列+哈夫曼树(Fence Repair)
DescriptionFarmer John wants to repair a small length of the fence around the pasture. He measures the fence and finds that he needs N (1 ≤ N ≤ 20,000) planks of wood, each having some integer length...
2018-10-19 19:48:53
356
原创 常见排序知识
转载自:https://blog.youkuaiyun.com/jkdd123456/article/details/83096684一:几种排序方法排序算法的复杂度:ACM常用算法排序二、1、冒泡排序:冒泡排序是一种简单的排序算法,但是时间复杂度较大。它重复地走访过要排序的数列,一次比较两个元素,如果它们的顺序错误就把它们交换过来。走访数列的工作是重复地进行直到没有再需要交换,也就是说该数...
2018-10-18 19:30:06
202
原创 组队赛(第七周)
ABDE为水题,CF为dpA - Nth Largest Value4552 Nth Largest ValueFor this problem, you will write a program that prints the N-th largest value in a fixed sized arrayof integers. To make things simple, N wi...
2018-10-16 21:15:37
182
原创 国庆第四场训练赛
A - ADescriptionLittle C loves number «3» very much. He loves all things about it.Now he has a positive integer $nnn$. He wants to split $nnn$ into $333$ positive integers $a,b,ca,b,ca,b,c$, such t...
2018-10-16 13:41:07
210
原创 国庆第三场训练赛
A - A CodeForces - 1042AThere are n benches in the Berland Central park. It is known that ai people are currently sitting on the i-th bench. Another m people are coming to the park and each of them i...
2018-10-16 12:57:52
290
原创 国庆第二场训练赛
AYou are given a string s of length n, which consists only of the first k letters of the Latin alphabet. All letters in string s are uppercase.A subsequence of string s is a string that can be deriv...
2018-10-16 12:22:09
297
原创 优先队列——Priority_Queue 详解
一、入门介绍1、 优先队列是一种特殊的队列,这种队列会自动的把队列里的数排序(默认从大到小,使用“<”判断),而且还可以把数按照特定的方法排列!(包括结构体和重载"<")2、 优先队列的头文件,需要包括:#include<queue>using namespace std;声明: 一个优先队列声明的基本格式是:priority_queue<结构类型>...
2018-10-15 15:13:45
377
原创 国庆第七场训练赛
E - Vitya in the Countryside CodeForces 719ADescriptionEvery summer Vitya comes to visit his grandmother in the countryside. This summer, he got a huge wart. Every grandma knows that one should trea...
2018-10-09 20:50:56
269
1
原创 国庆第六场训练赛
DescriptionToday an outstanding event is going to happen in the forest — hedgehog Filya will come to his old fried Sonya!Sonya is an owl and she sleeps during the day and stay awake from minute l1 t...
2018-10-08 21:01:39
263
原创 FATE
最近xhd正在玩一款叫做FATE的游戏,为了得到极品装备,xhd在不停的杀怪做任务。久而久之xhd开始对杀怪产生的厌恶感,但又不得不通过杀怪来升完这最后一级。现在的问题是,xhd升掉最后一级还需n的经验值,xhd还留有m的忍耐度,每杀一个怪xhd会得到相应的经验,并减掉相应的忍耐度。当忍耐度降到0或者0以下时,xhd就不会玩这游戏。xhd还说了他最多只杀s只怪。请问他能升掉这最后一级吗?Inp...
2018-10-08 14:34:41
329
原创 国庆第五场训练赛
A. Phone NumbersDescriptionLet’s call a string a phone number if it has length 11 and fits the pattern “8xxxxxxxxxx”, where each “x” is replaced by a digit.For example, “80123456789” and “800000000...
2018-10-06 17:25:20
421
原创 国庆第一场训练赛
A - Turn the Rectangles There are nn rectangles in a row. You can either turn each rectangle by 9090 degrees or leave it as it is. If you turn a rectangle, its width will be height, and its height...
2018-10-05 11:24:54
219
原创 1.4.4 Mother's Mil 母亲的牛奶(DFS)
Description农民约翰有三个容量分别是A,B,C升的桶,A,B,C分别是三个从1到20的整数,最初,A和B桶都是空的,而C桶是装满牛奶的。有时,约翰把牛奶从一个桶倒到另一个桶中,直到被灌桶装满或原桶空了。当然每一次灌注都是完全的。由于节约,牛奶不会有丢失。 写一个程序去帮助约翰找出当A桶是空的时候,C桶中牛奶所剩量的所有可能性。Input单独的一行包括三个整数A,B和C。O...
2018-10-01 11:42:49
303
原创 Junit框架使用--JUnit常用断言及注解
--------------------- 本文来自 xjanting 的优快云 博客 ,全文地址请点击:https://blog.youkuaiyun.com/smxjant/article/details/78206435?utm_source=copy软件测试方法:等价类划分法https://www.cnblogs.com/whylaughing/p/5821812.html一、核心——断言...
2018-09-30 11:32:07
927
1
原创 第二场训练赛
Masha wants to open her own bakery and bake muffins in one of the n cities numbered from 1 to n. There are m bidirectional roads, each of whose connects some pair of cities.To bake muffins in her...
2018-09-25 19:47:19
416
原创 STL---字符串使用方法
参考博客:https://blog.youkuaiyun.com/jkdd123456/article/details/815633041:string对象的定义和初始化以及读写 string s1; 默认构造函数,s1为空串string s2(s1); 将s2初始化为s1的一个副本string s3("valuee"...
2018-09-22 14:27:03
208
原创 2.3.3 Zero Sum 和为零(DFS)
Description请考虑一个由1到N(N=3, 4, 5 ... 9)的数字组成的递增数列:1 2 3 ... N。 现在请在数列中插入“+”表示加,或者“-”表示减,抑或是“ ”表示空白,来将每一对数字组合在一起(请不在第一个数字前插入符号)。 计算该表达式的结果并注意你是否得到了和为零。 请你写一个程序找出所有产生和为零的长度为N的数列。Input单独的一行表示整数N (3 &...
2018-09-19 20:39:39
619
1
原创 快速幂讲解
快速幂就是快速算底数的n次幂。 其时间复杂度为 O(log₂N), 与朴素的O(N)相比效率有了极大的提高。假设我们要求a^b,那么其实b是可以拆成二进制的,该二进制数第i位的权为2^(i-1),例如当b==11时 ,a11=a(2^0+2^1+2^3)11的二进制是1011,11 = 2³×1 + 2²×0 + 2¹×1 + 2º×1,因此,我们将a¹¹转化为算 a2^0*a2^1*a...
2018-09-19 19:31:10
312
原创 1.5.2 Prime Palindromes 回文质数(构造回文)
Description因为151即是一个质数又是一个回文数(从左到右和从右到左是看一样的),所以 151 号是回文质数。 写一个程序来找出范围[a,b](5 <= a < b <= 100,000,000)间的所有回文质数;Input第 1 行: 二个整数 a 和 bOutput输出一个回文质数的列表,一行一个。Sample Input5 500...
2018-09-18 21:58:23
501
原创 1.3.2 Barn Repair 修理牛棚
Description在一个夜黑风高,下着暴风雨的夜晚,农民约翰的牛棚的屋顶、门被吹飞了。 好在许多牛正在度假,所以牛棚没有住满。 剩下的牛一个紧挨着另一个被排成一行来过夜。 有些牛棚里有牛,有些没有。 所有的牛棚有相同的宽度。 自门遗失以后,农民约翰必须尽快在牛棚之前竖立起新的木板。 他的新木材供应商将会供应他任何他想要的长度,但是供应商只能提供有限数目的木板。 农民约翰想将他购买的木板总长...
2018-09-17 20:21:29
463
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人