Chapter 6 function oriented programming

Chapter VI functions 4.1 function definition and call 4.1.1 why to use function 1. Improve code reusability -- abstract and encapsulate as function 2. Decompose complex big problems into a series of small problems, divide and rule -- the idea of modular design 3. Facilitate code maintenance and m ...

Posted by SiriusB on Mon, 02 Mar 2020 06:01:33 +0100

Python Dictionary (dict) and list (list) and array (nbarray) details

  Catalog   I. dictionary Declaring dictionary Empty dictionary declaration method Common declaration method (key: value = 1:1) Add a new key value pair to the dictionary Dictionary format Traversal of dictionaries Common loop traversal and output the value of the corresponding key Travers ...

Posted by charlie2869 on Sun, 23 Feb 2020 12:32:42 +0100

Kotlin coding specification used by BAT

The Kotlin coding specification used in a big BAT factory has added a lot of contents on the basis of the official Kotlin specification, which is of great reference value. Code organization [mandatory] in a mixed java source project, the Kotlin source file should be located in the same root director ...

Posted by thryb on Sat, 22 Feb 2020 06:06:07 +0100

Attention mechanism and Seq2seq model

Attention mechanism In the "encoder decoder (seq2seq)" section, the decoder relies on the same context vector to obtain the input sequence information in each time step. When the encoder is a cyclic neural network, the background variable is used to detect the hidden state of its final time ...

Posted by alchemist_fr on Wed, 19 Feb 2020 08:05:39 +0100

"Hands on learning in depth learning": attention mechanism and Seq2seq model (punch 2.2)

2. Attention mechanism and Seq2seq model 2.1. Attention mechanism 2.1.1. concept 2.1.2. framework The difference between different attention layers lies in the choice of score function. In the rest of this section, we will discuss two commonly used attention layers, dot product attention and Multila ...

Posted by susi on Tue, 18 Feb 2020 11:13:27 +0100

Java 8 new features learning notes

Lambda expression To tell you the truth, when I first saw this word, it was very obscure. How to read it back and forth was very strange. Later, what you understand, of course, was to search it. Hahaha, it turned out to be that λ It allows functions to be passed as arguments, ← to hit the ...

Posted by raquelzinha on Sun, 16 Feb 2020 10:14:19 +0100

Flatten the surface in Python [Repeat]

This question is already answered here: How do I make a flat list from a list? 45 answers Is there an easy way to understand lists to flatten lists of iterative objects, otherwise, if you don't think it's the best way to flatten such shallows, balance performance and readability? I tried to flatten such lists by understanding ...

Posted by johnny44 on Sun, 16 Feb 2020 02:51:22 +0100

Python 3 functional programming: anonymous function, higher-order function, decorator

1, Anonymous function 1. Definition: function name does not need to be defined when defining function 2. Specific examples: #Ordinary function def add(x,y): return x + y #Anonymous function lambda x,y: x + y Call anonymous function: f = lambda x,y: x + y #Call after assignment print(f(1,2) In lambda (i.e. later), only simple ex ...

Posted by NickG21 on Tue, 11 Feb 2020 13:42:57 +0100

Day13 stream stream, method reference

Chapter 1 Stream stream When it comes to streams, it's easy to think of I / O streams. In fact, who stipulates that "streams" must be "IO streams"? In Java 8, thanks to the functional programming brought by Lambda, a new Stream concept is introduced to solve the existing drawbacks ...

Posted by demon_athens on Thu, 06 Feb 2020 07:24:02 +0100

YOLOv3 target detection uses its own data set detailed process.

The specific concept and process of YOLOv3 will not be introduced here, but the implementation steps will be explained directly below. Computer environment: win10 + Python 3.6 + tensorflow GPU 1.12.0 + keras GPU 2.2.4 + cuda9.0IDE: PyCharm + Anaconda Catalog I. production of data set 1.1 LabelImg ta ...

Posted by drorshem on Wed, 05 Feb 2020 14:34:08 +0100