机器学习绘图模板
机器学习绘图模板
By dair.ai
Basic components
Softmax
Convolve
Sharpen
Softmax
Convolve
Sharpen
Architectures
C C C CNN
Layer
Input
Conv3-32 Conv3-64
Maxpool
x4 x2
32x32x3
Output
Feature
FC-512
Vector
SM
FC
AM
L L L L L L L
L L L L L L L Conv
C C C C C C C
SM
FC
L L L L L L L Conv
C C C C C C C
SM
FC
L L L L L L L L L L
C C C C C C C C C C
SM
FC
Conv
C C C C C C C C C C
A) LSTM B) Mixed LSTM / 1D Conv
FC
AM
L L L L L L L L L L Conv
C C C C C C C C C C
SM
FC
L L L L L L L L L L Conv
C C C C C C C C C C
SM
FC
AM
L L L L L L L L L L
L L L L L L L L L L Conv
C C C C C C C C C C
SM
FC
L L L L L L L L L L Conv
C C C C C C C C C C
Attention
layer
LSTM
layer
CNN C C C C C C C C C C
layer
Attention
layer
LSTM
layer
CNN C C C C C C C C C C
layer
SM
FC
AM
L L L L L L L Conv
C C C C C C C
Hidden
Layers
a[4] Ŷ
X
a[1]3 a[2]3 a[3]3
a[4] Ŷ
X
a[1]3 a[2]3 a[3]3
a[4] Ŷ
X
a[1]3 a[2]3 a[3]3
+b2 +b2
NxNx3
MxM ReLU
a[l-1] a[l]
CONV
operation
MxM ReLU
+b2 +b2
NxNx3
MxM ReLU
CONV
operation
MxM ReLU
+b2 +b2
NxNx3
MxM ReLU
Striding in
CONV
S=1
S=2
Inception MaxPool
Module Same s=1
5x5 Same
NxNx192
3x3 Same
1x1 Same
NxNx128
NxNx192
NxNx32
NxNx64
Softmax
Linear
Positional Positional
Encoding Encoding
Input Output
Embedding Embedding
Linear
Positional Positional
Encoding Encoding
Input Output
Embedding Embedding
Tokenize
Walk PRICE
? ŷ Basic Neuron
ZIP
Model
Schoo
l
How does NN
Wealth work (Insprired
from Coursera)
Ŷ = 0
Ŷ = 1
Logistic
Regression
Linear ReLU(x)
regression
$
$
Size Size
256
225
56
.
R-G-B
NxN .
NxN .
NxN NxN
214
210
211
Med NN
η Small NN
SVM,LR
etc
Amount of
Data
a[1]1
a[1]2
X a[2] Ŷ
a[1]3
a[1]4
a[2]
x[2] a[1]2
x[1]
x[2]
x[3]
x2
x2
x1 x1 x1
a[L] DropOut
x[2]
x[3]
x2
r=1
x2
Normalizatio
x1 n
x1
w2 Early stopping
J
Er
r
w1
w1
Before Dev
w2
Normalization
Train
it
.
J w2
w1 w1
After Normalization
w2
x1
x2 w[L]
FN TN
TP FP
Understanding
Precision & Recall
Batch vs. Mini-
batch
Gradient Descent
w2 w2
BGD
SGD
Batch
Gradient Descent
vs. SGD
SGD
w1 w1
x[1]
p[1]
x[2]
p[2]
x[3]
Softmax Prediction
with 2 outputs
Abstract backgrounds
dair.ai
Gradient Backgrounds
ML and Health
Time slice
in
Theta
Alpha o pa
Conv N
IC
A Conv
Conv L
Conv
Conv S
Alpha Conv
Conv T
Conv M
Conv
Conv
Conv
+
Conv A
Conv
Beta
Conv M
Conv
Conv
Conv
n e
en n
tio tur
s m t io
en t y
ng re
EEG Time Series
s m si
ga a
es ca
t
ni tu
es
re Fe
es en
ss o
ar e a
ag
A in L
Spectral Topography
s s nt
gg a l
Le i a l F
Im
A in I
A por
Pa
Maps
G
Pa
m
at
EE
Te
Sp
Conv
Conv
Conv
Conv
Conv
Conv
Conv
Conv
Conv
Conv
Activations
(U=WX)
Scalp maps
( )
Test S1 S2 S3 S4 S5 S6 S7 S8 S9 S10 S11 S12 S13 Ave
Subje rag
ct e
Acc
ura
cy
Pain 0.8 0.88 0.95 0.96 0.93 0.95 1 0.97 0.98 0.92 0.90 0.89 0.80 0.9
Inten 20 82 69 25 22 63 07 09 26 15 2 94 226
sity 9 230
77
Pain 0.7 0.80 0.93 0.99 0.92 1 0.99 0.90 0.88 0.89 0.88 0.70 0.75 0.8
Locat 24 28 97 51 86 48 88 44 56 16 81 91 786
ion 3 846
15
Level 1 Level 2 Level 3 Level 4
Signal Segmentation
AEP
Bicubic
PSD
Theta(4~8Hz) Spectral
FFT Topography
Alpha(8~13Hz) Map
Beta(13~30Hz)
Image Generation
Input
32x32x3
Output
Feature
FC-512
Vector
ConvNet Configuration
Feature
Vector
Output
FC-512
Max-Pool
Output
Conv3-128
3
ConvNet Configuration
er
FC-512
Lay
ck4
Max-Pool
Sta
Max-Pool
Conv3-64
Conv3-128
ck3
Conv3-64
2
Sta
er
Max-Pool
Lay
Max-Pool
Conv3-64
Conv3-32
Conv3-64
ck2
Conv3-32
Sta
Max-Pool
Conv3-32
Conv3-32
Conv3-32
1er
Conv3-32
Lay
Input
Conv3-32
Conv3-32
ck1
Sta
Softmax
FC
er3 er4
Lay Lay
FC
Max-
Pool
Conv
2
er
Max-
Lay
Pool
Conv
1
er
Lay
Input
Output
FC-512
ck4
Sta
Max-Pool
Conv3-128
ck3
Sta
Max-Pool
Conv3-64
ck1
Conv3-64
ck2
Sta
Sta
Max-Pool
Conv3-32
Conv3-32
Conv3-32
Conv3-32
Time
Unbearable
Level 5 Pain
High
Level 4
Pain
Medium
Level 3 Pain
Low
Level 2
Pain
No
Level 1
Pain
(a) (b)
Miscellaneous
16+3
3 16 16 16 16 1
2
Convolution 3x3 Convolution 1x1 Dropout
0.1
Dropout
Max Pooling 2x2 Skip connection
Up Sampling 0.2
Dropout
Block copied 0.3
2x2
32 32 32+6
32
4
64 64 64+12
64
8
12 12 12
128+256
8 8 8
25 25
6 6
Feature
Vector
Output
FC-512
Max-Pool
Output
Conv3-128
3er
FC-512
Lay
4er
Max-Pool
Lay
Max-Pool
Conv3-64
Conv3-128
3er
Conv3-64
2
Lay
er
Max-Pool
Lay
Max-Pool
Conv3-64
Conv3-32
Conv3-64
2er
Conv3-32
Lay
Max-Pool
Conv3-32
Conv3-32
Conv3-32
1er
Conv3-32
Lay
Input
Conv3-32
Conv3-32
1er
Lay
Softmax
FC
er3 er4
Lay Lay
FC
Max-
Pool
Conv
2
er
Max-
Lay
Pool
Conv
1
er
Lay
Input
Filter
concatenation
1x1 convolutions
Previous layer
Filter
concatenation
1x1 convolutions
Previous layer
Input
1x11 conv
1x11 conv
Inception 1
Inception 2
Inception 2
Inception 2
1x7 conv
1x7 conv
FC
FC
Output
Previous layer
1x3 conv,
1 padding 1x3 conv,
1 padding
1x7 conv,
1x3 conv, 3 padding
1 padding
1x5 conv,
2 padding
1x3 conv,
1 padding
Filter
concatenation
Auxiliary Classifier
Softmax
Auxiliary Classifier
FC
Softmax Conv
FC Avg-Pool
FC Inception
Conv Inception Softmax
Avg-Pool Max-Pool FC
Inception FC
Inception Conv
Inception Avg-Pool
Inception
Inception
Max-Pool
Inception
Inception
Max-Pool
Conv
Max-Pool
Conv
Max-Pool
Conv
Input
Filter Filter
concatenation concatenation
(a) (b)
Previous input Previous input
x x
R1
R1 R2
R1
R1 R2 R3 R1 R2 R3
Dense Block 1 Dense Block 2 Dense Block 3
Avg-Pool
Avg-Pool
Avg-Pool
Softmax
Conv
Conv
Conv
Input
FC
Transition layers
hi+1
Filter
concatenation
3x3 3x3 5x5 3x3 3x3 3x3 3x3 5x5 7x7 5x5 3x3 7x7 3x3 5x5
identity identity
conv conv conv avg avg avg conv conv conv conv max conv avg conv
hi hi
... ...
hi-1 hi-1
(a) (b)
Max(1,1,5,6) = 6
Y
1 1 2 4
5 6 7 8 6 8
3 2 1 0 Pooling performed 3 4
with a 2x2 kernel
and a stride of 2
1 2 3 4
X
Image
Representation
ML System Design / Infrastructure
疼痛等级 治疗力度
使用者的治疗时长、治疗
方案、治疗反馈记录