The RNN practice of Python

RNN principle Cyclic neural network: processing sequence model, weight sharing. h[t] = fw(h[t-1], x[t]) #fw is some function with parameters W h[t] = tanh(W[h,h]*h[t-1] + W[x,h]*x[t]) #to be specific y[t] = W[h,y]*h[t] Sequence to Sequence model Schematic diagram of language model RNN ...

Posted by Panjabel on Sun, 26 Jan 2020 02:30:39 -0800

Java hidden problems

1. Comparison between basic type and reference type 1.1. Which of the following four variables is false Integer i01 = 59; int i02 = 59; Integer i03 =Integer.valueOf(59); Integer i04 = new Integer(59); (1) Integer in order to save space and memory, the number between - 128 and 127 will be cached in mem ...

Posted by MtPHP2 on Sun, 26 Jan 2020 00:06:15 -0800

Algorithm-10-priority queue

Catalog 1, background 2. Priority queue 3. Binary pile 4. Insert function - insert() 5. Delete maximum element - delMax() 6. Full code 7. Trigeminal tree 1, background Consider the following: enter N int values to find the maximum (or minimum) M int values. This scenario can appear in: for ...

Posted by MattMan on Sun, 26 Jan 2020 00:02:40 -0800

Daily AC Series: Sum of Four

1 Topic Leetcode Question 18 Given an array and a target, find out that the sum of the four numbers in the array is all four unreplicated numbers of the target. 2 Violence List<List<Integer>> result = new ArrayList<>(); if (nums.length == 4 && nums[0] + nums[1] + nums[2] + nums[3] == target) result.add(Arrays.asLi ...

Posted by pixelfish on Sat, 25 Jan 2020 21:57:39 -0800

Algorithms Note 9 - Hash List

Hash function Hash list based on zipper method Realization performance Hash List Based on Linear Detection Realization performance If all keys are small integers, you can use an array as an unordered symbol table and the key as an index of the array, where the value stored at the corresponding location is the value of the key.Th ...

Posted by thechris on Sat, 25 Jan 2020 17:00:30 -0800

Paging component implemented by vue

/* Use components: <pagination></pagination> The properties passed in the component are: 1. total: how many pieces of data are there: required parameters 2. prepage: how many optional parameters are displayed on one page. The default value is 2 3. Show page: how many optional parameters are displayed for the numbe ...

Posted by xyn on Sat, 25 Jan 2020 06:43:51 -0800

Design a page with nunjucks template

Use nunjucks instead of ejs, because this is a more powerful template engine in nodenunjucks official website Configure to use the nunjucks template engine The nunjuks template engine does not have specific restrictions on the suffix of template file names If the file name is a.html, you need to pass in a.html when rendering Pass b.nujs if the ...

Posted by lansing on Fri, 24 Jan 2020 06:12:01 -0800

Light reptile + OCR part I

The first reptile in life (python3) Preface This blog is used to record the first gadget written by Xiaobai in python. It takes more than a day. In addition, I am still learning. This blog is my opinion and notes. There will be many mistakes and shortcomings. I hope you can give me some advice. This ...

Posted by johnnyk on Fri, 24 Jan 2020 02:34:11 -0800

Daily AC series: the closest sum of three

1 topic The sixteenth question of leetcode , given an array and a target number, find out three numbers in the array. The sum of these three numbers should be closest to the target number. 2 violence As a rule, the first O(n3) violence: int temp = nums[0]+nums[1]+nums[2]; for(int i=0;i<nums.lengt ...

Posted by belaraka on Fri, 24 Jan 2020 01:24:12 -0800

CCF 2019-12 third question chemical equation balancing

Explanation: String emulation The meaning of the question is to judge whether the chemical equation is balanced. Basic idea: count the elements on the left and right side of the chemical equation, and then judge whether all elements are equal.    step 1: split the string    & ...

Posted by amir on Fri, 24 Jan 2020 01:13:47 -0800