tensorflow 2.0 deep learning (Part 3 convolution neural network part 2)

Various classical convolution networks LeNet-5 import tensorflow as tf help(tf.losses.categorical_crossentropy) //View the list of default parameters and the introduction to the usage of the category? Crossentropy function //Where the parameter is from Logits = false by default, and the netw ...

Added by graham23s on Sun, 26 Jan 2020 11:25:32 +0200

How do you create comma separated strings from a list of strings?

Which is the best way to connect strings in a sequence so that you can add a comma between each two consecutive pairs. That is, how do you map, for example ['a ',' B ',' C '] to' a,b,c '? (cases ['s'] and [] should be mapped to 's' and' ', respectively.) I usually end up using something like '. Join (map (lambda x: x +', l)) [: - 1], but I' ...

Added by paparts on Wed, 22 Jan 2020 16:03:17 +0200

The implementation of StrVec class in dynamic memory management of C++Primer

Design of StrVec class The vector class stores its elements in contiguous memory. In order to achieve acceptable performance, vector allocates enough memory in advance to hold more elements that may be needed. The member function of each added element of vector checks to see if there is room for more el ...

Added by kellog on Sun, 19 Jan 2020 06:01:36 +0200

Task2 Machine Learning Starter Notes Logical Regression

Differences between Logical Regression and Linear Regression Linear regression can be applied to a similar number of training samples in different categories.If the number of training samples varies slightly from one category to another, it usually has little effect, but if the difference is large, th ...

Added by dmcentire on Tue, 14 Jan 2020 03:32:28 +0200

q learning sarsa 2D treasure hunt

Using Q-learning algorithm to realize two-dimensional treasure hunt game   sarsa(lambda) algorithm in which lambda represents the importance of past experience If lambda = 0, Sarsa lambda is Sarsa, only update the last step before getting reward If lambda = 1, sarsa lambda updates to get all the steps before reward   Game process   ...

Added by rahulroy on Sat, 04 Jan 2020 08:59:05 +0200

C++ std::function example

grammar std::function Defined in header file template< class > class function; /* Not defined */ (C++11 rise) template< class R, class... Args > class function<R(Args...)>; (C++11 rise) Class template std::function is a general polymorphic function wrapper. The instance of std::function can store, copy ...

Added by JohnN4 on Fri, 03 Jan 2020 17:03:24 +0200

Collection and Iterator interface -- Java Collection Series

The Collection interface is the parent interface of the List, Set and Queue interfaces. The methods defined in the interface can be used to operate both the Set Collection and the List and Queue Collection. 1. Collection interface method 1.1 method API boolean add(Object o) Add an element to the collection and return true when the collect ...

Added by teamshultz on Tue, 31 Dec 2019 07:03:59 +0200

C × lambda expression learning notes

This note is excerpted from: https://www.cnblogs.com/leslies2/archive/2012/03/22/2389318.html Record the learning process for future reference. I. significance of Lambda Before Framework 2.0, the only way to declare delegates was through method naming. Since Framework 2.0, anonymous methods have been supported. Through anonymous method, you can ...

Added by laduch on Mon, 23 Dec 2019 09:47:03 +0200

Wechat friends' personal tag words cloud -- wechat data analysis (4)

Sketch Code First, package the data with the code in the following link https://blog.csdn.net/a19990412/article/details/82942269 Background map used when building word cloud The resulting effect is: It can be found that although my wechat friends seem to be funny one by one, their personality tags seem to be slowly positi ...

Added by teddirez on Fri, 20 Dec 2019 17:54:10 +0200

2. Implementation of multi-threading

1. The main ways to implement multithreading: One is to inherit the Thread classAn implementation of Runnable interface 2. The difference between inheriting the Thread class and implementing the Runnable interface: Since Java is a single inheritance method, you cannot inherit the Thread class if the thread class already inherits other classes, ...

Added by john1704 on Wed, 11 Dec 2019 05:00:10 +0200