- 博客(56)
- 收藏
- 关注
原创 hello world
//C#include <stdio.h>int main() { printf("Hello World");}//Javapublic class HelloWorld { public static void main(String[] args) { System.out.println("Hello World"); }...
2019-09-14 15:29:58
169
转载 RNN前向反向传播(花书《深度学习》10.2循环神经网络)
最近在阅读花书《深度学习》10.2循环神经网络,对该节公式(10.21)有所疑惑,主要是发现该公式的梯度表示维度计算有问题,且与(10.22)~(10.28)有矛盾,因此本文基于刘建平老师原文原文链接:循环神经网络(RNN)模型与前向反向传播算法,添加了部分基础知识和更细节的公式推导,探究问题所在。感谢刘老师!!!刘建平老师博客地址1 预备数学1.1 tanh与导数tanh函数是一种激活函数...
2019-06-15 19:03:05
591
2
原创 信息熵、相对熵(KL散度)、交叉熵
文章目录1信息熵2相对熵(KL散度)3交叉熵1信息熵系统越有序,信息熵越低(越可能发生的事情发生,信息量越低,不太可能的事情发生,才能搞个大新闻)所以X=[0,1,0],H(X)=0X=[0.2,0.2,0.6],H(X)=0.95H(X)=−∑i=1np(xi)logp(xi) H(X) = - \sum\limits_{i = 1}^n {p({x_i})\log p({x_i...
2019-05-21 10:45:11
424
原创 第一章 概述
1.什么是知识图谱 知识图谱是谷歌用来支持语义角度组织网络数据,从而提供智能搜索的知识库。是通用的语义知识的形式化描述框架,用结点表示语义符号,边表示符号之间的关系。 用三元组形式描述和存储知识:如<Max Planck,instance of,human>。 知识图谱表示为 G={E,R,S},其中E={e1,e2,···e|E|}表...
2019-05-15 21:27:00
264
原创 PAT A1003 Emergency+Dijkstra
1003Emergency(25分)As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by some roads. Amount of rescue teams...
2019-03-16 21:43:03
152
原创 PAT A1076 Forwards on Weibo+图BFS
1076Forwards on Weibo(30分)Weibo is known as the Chinese version of Twitter. One user on Weibo may have many followers, and may follow many other users as well. Hence a social network is formed wi...
2019-03-15 21:50:28
189
原创 PAT A1107 Social Clusters +并查集
1107Social Clusters(30分)When register on a social network, you are always asked to specify your hobbies in order to find some potential friends with the same hobbies. Asocial clusteris a set of...
2019-03-15 20:12:50
146
原创 PAT A1043 Is It a Binary Search Tree+BST建树+树递归遍历
1043Is It a Binary Search Tree(25分)A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only nodes with keys...
2019-03-14 21:25:30
180
原创 PAT A1053 Path of Equal Weight +静态树+深搜
Given a non-empty tree with rootR, and with weightWiassigned to each tree nodeTi. Theweight of a path fromRtoLis defined to be the sum of the weights of all the nodes along the path fro...
2019-03-14 20:20:48
155
原创 PAT A1040 Longest Symmetric String+DP最长回文串
1040Longest Symmetric String(25分)Given a string, you are supposed to output the length of the longest symmetric sub-string. For example, givenIs PAT&TAP symmetric?, the longest symmetric sub...
2019-03-13 14:31:27
159
原创 PAT A1091 Acute Stroke+BFS
One important factor to identify acute stroke (急性脑卒中) is the volume of the stroke core. Given the results of image analysis in which the core regions are identified in each MRI slice, your job is to c...
2019-03-12 20:50:47
156
原创 PAT A1103 Integer Factorization+DFS
1103Integer Factorization(30 分)TheK−Pfactorization of a positive integerNis to writeNas the sum of theP-th power ofKpositive integers. You are supposed to write a program to find theK−P...
2019-03-12 15:59:46
205
原创 PAT A1074 Reversing Linked List+静态链表order
1074Reversing Linked List(25 分)Given a constantKand a singly linked listL, you are supposed to reverse the links of everyKelements onL. For example, givenLbeing 1→2→3→4→5→6, ifK=3, then y...
2019-03-11 17:04:03
169
原创 PAT A1032 Sharing+静态链表初探
1032Sharing(25 分)To store English words, one method is to use linked lists and store a word letter by letter. To save some space, we may let the words share the same sublist if they share the same...
2019-03-11 12:27:00
135
原创 PAT A1056 Mice and Rice+队列初探
Mice and Riceis the name of a programming contest in which each programmer must write a piece of code to control the movements of a mouse in a given map. The goal of each mouse is to eat as much rice...
2019-03-10 20:55:44
131
原创 PAT A1071 Speech Patterns+单词计数
1071Speech Patterns(25 分)People often have a preference among synonyms of the same word. For example, some may prefer "the police", while others may prefer "the cops". Analyzing such patterns can ...
2019-03-10 15:41:56
150
原创 PAT A1100 Mars Numbers+map初探
People on Mars count their numbers with base 13:Zero on Earth is called "tret" on Mars. The numbers 1 to 12 on Earth is called "jan, feb, mar, apr, may, jun, jly, aug, sep, oct, nov, dec" on Mars, ...
2019-03-10 14:49:43
275
原创 PAT A1060 Are They Equal+字符串处理
If a machine can save only 3 significant digits, the float numbers 12300 and 12358.9 are considered equal since they are both saved as0.123×105with simple chopping. Now given the number of signif...
2019-03-09 20:26:15
115
原创 PAT A1063 Set Similarity+Set初探
Given two sets of integers, the similarity of the sets is defined to be Nc/Nt×100%, where Nc is the number of distinct common numbers shared by the two sets, and Nt is the total number of ...
2019-03-03 21:47:36
151
原创 PAT A1029 Median+答案错误+内存受限
1029 Median (25 分)Given an increasing sequence S of N integers, the median is the number at the middle position. For example, the median of S1 = { 11, 12, 13, 14 } is 12, and the median of S2 = { 9,...
2019-02-26 17:10:34
404
原创 PAT A1089 Insert or Merge模拟插入和归并
1089 Insert or Merge (25 分)According to Wikipedia:Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insertion sort removes one...
2019-02-26 15:40:11
253
原创 PAT A1044 Shopping in Mars二分
Shopping in Mars is quite a different experience. The Mars people pay by chained diamonds. Each diamond has a value (in Mars dollars M$). When making the payment, the chain can be cut at any position ...
2019-02-26 13:41:05
117
原创 PAT A1010 Radix +神
1010 Radix (25 分)Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is yes, if 6 is a decimal number and 110 is a binary number.Now for any pa...
2019-02-25 21:09:56
311
原创 PAT A1067 Sort with Swap(0, i) +运行超时
Given any permutation of the numbers {0, 1, 2,..., N−1}, it is easy to sort them in increasing order. But what if Swap(0, *) is the ONLY operation that is allowed to use? For example, to sort {4, 0, 2...
2019-02-20 15:28:20
306
原创 PAT A1037 Magic Coupon+For语句中多条执行
The magic shop in Mars is offering some magic coupons. Each coupon has an integer N printed on it, meaning that when you use this coupon with a product, you may get N times the value of that product b...
2019-02-20 14:03:10
119
原创 李宏毅 GAN课程PDF讲义分享
链接:https://pan.baidu.com/s/1tsLwOoCZ1DZV_VgidLzlWA提取码:mc6h
2019-02-12 21:25:53
1601
6
原创 PAT B1020 月饼+测试点3答案错误
1020 月饼 (25 分)月饼是中国人在中秋佳节时吃的一种传统食品,不同地区有许多不同风味的月饼。现给定所有种类月饼的库存量、总售价、以及市场的最大需求量,请你计算可以获得的最大收益是多少。注意:销售时允许取出一部分库存。样例给出的情形是这样的:假如我们有 3 种月饼,其库存量分别为 18、15、10 万吨,总售价分别为 75、72、45 亿元。如果市场的最大需求量只有 20 万吨,那么...
2019-02-09 20:19:19
2014
6
原创 PAT B1005 继续(3n+1)猜想+测试点4答案错误
1005 继续(3n+1)猜想 (25 分)卡拉兹(Callatz)猜想已经在1001中给出了描述。在这个题目里,情况稍微有些复杂。当我们验证卡拉兹猜想的时候,为了避免重复计算,可以记录下递推过程中遇到的每一个数。例如对 n=3 进行验证的时候,我们需要计算 3、5、8、4、2、1,则当我们对 n=5、8、4、2 进行验证的时候,就可以直接判定卡拉兹猜想的真伪,而不需要重复计算,因为这 4...
2019-02-08 16:36:11
1929
1
原创 PAT A1041 Be Unique散列
1041 Be Unique (20 分)Being unique is so important to people on Mars that even their lottery is designed in a unique way. The rule of winning is simple: one bets on a number chosen from [1,104]. T...
2019-02-06 21:38:36
146
原创 PAT B1033 旧键盘打字+测试点2不过
1033 旧键盘打字 (20 分)旧键盘上坏了几个键,于是在敲一段文字的时候,对应的字符就不会出现。现在给出应该输入的一段文字、以及坏掉的那些键,打出的结果文字会是怎样?输入格式:输入在 2 行中分别给出坏掉的那些键、以及应该输入的文字。其中对应英文字母的坏键以大写给出;每段文字是不超过 105 个字符的串。可用的字符包括字母 [a-z, A-Z]、数字 0-9、以及下划线 _(...
2019-02-05 20:52:43
1443
4
原创 PAT A1016 Phone Bills 难
A long-distance telephone company charges its customers by the following rules:Making a long-distance call costs a certain amount per minute, depending on the time of day when the call is made. When...
2019-02-03 21:15:07
144
原创 PAT B1015德才论 段错误
1015 德才论 (25 分)宋代史学家司马光在《资治通鉴》中有一段著名的“德才论”:“是故才德全尽谓之圣人,才德兼亡谓之愚人,德胜才谓之君子,才胜德谓之小人。凡取人之术,苟不得圣人,君子而与之,与其得小人,不若得愚人。”现给出一批考生的德才分数,请根据司马光的理论给出录取排名。输入格式:输入第一行给出 3 个正整数,分别为:N(≤105),即考生总数;L(≥60),为录取最...
2019-01-30 17:48:32
720
1
原创 PAT A1082 Read Number in Chinese 难
1082 Read Number in Chinese (25 分)Given an integer with no more than 9 digits, you are supposed to read it in the traditional Chinese way. Output Fu first if it is negative. For example, -123456789 ...
2019-01-30 16:41:17
196
原创 PAT A1073 Scientific Notation
1073 Scientific Notation (20 分)Scientific notation is the way that scientists easily handle very large numbers or very small numbers. The notation matches the regular expression [+-][1-9].[0-9]+E[+-...
2019-01-29 12:10:18
97
原创 PAT B1045快速排序之运行超时+格式错误
1045 快速排序 (25 分)著名的快速排序算法里有一个经典的划分过程:我们通常采用某种方法取一个元素作为主元,通过交换,把比主元小的元素放到它的左边,比主元大的元素放到它的右边。 给定划分后的 N 个互不相同的正整数的排列,请问有多少个元素可能是划分前选取的主元?例如给定 $N = 5$, 排列是1、3、2、4、5。则:1 的左边没有元素,右边的元素都比它大,所以它可能是主元; ...
2019-01-27 11:23:10
786
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人