Principle and code analysis of the strongest ViT (Vision Transformer) in the whole network
Today, let's learn more about Vision Transformer. timm based code.
1. Patch Embedding
Transformer was originally used to do NLP work, so ViT's primary task is to convert the graph into word structure. The method adopted here is to divide the picture into small blocks, as shown in the lower left corner of the above figure. Eac ...
Posted by warran on Fri, 29 Oct 2021 10:38:15 -0700
Structure byte alignment and common body size
1. Structure memory alignment
Structure memory alignment is often asked in written examination and interview, so to make a summary, first verify the memory size of different structures through code:
#include <stdio.h>
struct Node1{
char c1;
int val1;
char c2;
};
struct Node2{
char c1;
char c2;
int val1;
};
struct ...
Posted by scheibyem on Fri, 29 Oct 2021 10:30:18 -0700
Neural network learning
Neural network learning (I)
Learning content:
1. Watch the teaching video of neural network, the use video of pytorch and the training video of mnist using keras framework, and have a preliminary understanding of neural network and classical training model
2. Read the group file introduction pdf to deepen the understanding of neural networks an ...
Posted by xzazx on Fri, 29 Oct 2021 10:28:26 -0700
std::enable_if and boost::enable_if,boost::enable_if_c. differences and relations between
The standard library and the three enablers of boost_ If series of functions can help us overload template functions.
Overloading of general functions
Let's take a look at an example of general function overloading:
#include <iostream>
void print(int i)
{
std::cout << "Integral: " << i << std::endl;
}
void print(d ...
Posted by romeo on Fri, 29 Oct 2021 09:25:57 -0700
shell data filtering
Let's talk about data analysis:
Data collection: responsible for data collection
Data cleaning: responsible for data filtering
Data analysis: data operation and sorting
Data display: output results in chart or table mode
shell script data processing
1) Data retrieval: grep tr cut
2) Data processing: uniq sort tee paste xargs
In the previous s ...
Posted by Suchy on Fri, 29 Oct 2021 09:24:12 -0700
GateWay service GateWay
spring Cloud gateway has the following features:
Dynamic routing: it can match any request attribute;
You can specify Predicate assertions and filters for routes
Integrate spring cloud service discovery
Easy to write Predicate assertions and filters
Request current limiting function
Support path rewriting
Three core concepts
route:
Ro ...
Posted by Froolah on Fri, 29 Oct 2021 08:29:16 -0700
Animation and transition, advanced view Animation: extend the definition of animation
Android animation and overview mainly covers the following contents:
Animation and transition (I). Overview and use of view animation Animation and transition (II). Advanced view Animation: extend the definition of animation Animation and transition (III), interpolator and estimator overview and use Animation and transition (IV). Use Layout ...
Posted by JMJimmy on Fri, 29 Oct 2021 08:29:47 -0700
[algorithm problem solving details] DFS solves the area surrounded by force buckle 130
subject
Give you a matrix board of m x n, which consists of several characters' X 'and' O ', find all areas surrounded by' X ', and fill all' O 'in these areas with' X '. Example 1
Input: board = [["X","X","X","X"],["X","O","O","X"],["X","X","O","X"],["X","O","X","X"]]
Output:[["X","X","X","X"],["X","X","X","X"],["X","X","X","X"],["X","O","X ...
Posted by sheffrem on Fri, 29 Oct 2021 07:49:35 -0700
Analysis of Vue3 response principle
How does the responsive module work in Vue3? For example, there are three attributes: price, quantity and total price.
let price = 5
let quantity = 2
let total = price * quantity
We want to be responsive, that is, when the price is updated, the price on the web page is updated, and the calculated total is also updated. Define a calculation fu ...
Posted by jjfletch on Fri, 29 Oct 2021 07:13:06 -0700
Network configuration in Linux 2021-10-29
IP and subnet mask concepts
1. What is IP ADDRESS
internet protocol ADDRESS ## network process address ipv4 internet protocol version 4
ip is composed of 32 01s 11111110.11111110.11111110.11111110 = 254.254.254.254
2. Subnet mask Used to divide the network area The number on the ip corresponding to the non-zero bit of the subnet mask repres ...
Posted by svenski on Fri, 29 Oct 2021 06:59:13 -0700