SlideShare une entreprise Scribd logo
1  sur  109
Functional CNN in Elixir
Masayoshi Tamura
Retrieva, Inc.
© 2020, Retrieva, Inc. All rights reserved.
Agenda
• Self-introduction
• What is Elixir
• What is Convolutional Newral Network(CNN)
• CNN in Elixir
• Functional CNN
• Acceleration
• Tips
• Future work
© 2020, Retrieva, Inc. All rights reserved. 2
Who am I?
Self-introduction
© 2020, Retrieva, Inc. All rights reserved. 3
Java
C
C#
C++
JavaScript
Python
Elixir
Haskell
prolog
R
matlab
Lua
php
SAS
SVF
Objective-C
cocos2d-x
AngularJS
jQuery
D3.js
TwitterAPI
Docker
CircleCI
Apache
Tomcat
OpenGL
GLSL
WebGL
OpenCL
Oracle
MySQL
PostgreSQL
SQLServer
memcached
Spring
Seasar2
Servlet
Jenkins
Nginx
WebSphere
RPM
Hadoop
maven
ProtocolBuffer
gRPC
Tensorflow
Chainer
scikit-learn
k-means
Naïve Bayes Classifier
Random Forest
Ray Tracer
Photon Mapper
Dynamic Programing
Greedy Algorithm
Binary Indexed Tree
Segement Tree
Masayoshi Tamura
• Educational Background
|> Waseda University Senior High School
|> Waseda University(BAPsy)
|> Oregon State University(MEng)
• Engineering Career
|> System Development Company
|> Mobile Game Development Company
|> Freelance Smartphone Game Developer
|> Retrieva
© 2020, Retrieva, Inc. All rights reserved. 4
Masayoshi Tamura
• Community
|> fukuoka.ex
|> Japan Android Group
• Hobby
|> Boxing
|> Bouldering
|> Footsal
|> Rock Festival
|> Sake
© 2020, Retrieva, Inc. All rights reserved. 5
My Events in 2019
• Events
|> ElixirConf JP 2019 Lightning Talk
|> Forkwell press interview
|> Elixir Advent Calendar 2019 Day 18
|> fukuoka.ex Advent Calendar 2019 Day 17
© 2020, Retrieva, Inc. All rights reserved. 6
© 2020, Retrieva, Inc. All rights reserved. 7
First of all,
why Deep Learning in Elixir?
Motivation
• Fast training on the machine without CUDA
• To learn how deep learning is working
• Favorite Language
• No practical library in Elixir so far
• Ecosystem is growing
© 2020, Retrieva, Inc. All rights reserved. 8
Resource
• My implementation is based on
“DeepLeening from scratch”
written by Koki Saito[1]
https://github.com/oreilly-japan/deep-learning-from-scratch
© 2020, Retrieva, Inc. All rights reserved. 9
What is Elixir
© 2020, Retrieva, Inc. All rights reserved. 10
Elixir
• Functional Programming Language
• Pipe |> Operator
• BEAM(Bogdan's Erlang Abstract Machine) = Erlang VM
• Immutable
• Concurrency
• Failure Resistance
• Not assignment but binding
• Availability
• Let it crash
© 2020, Retrieva, Inc. All rights reserved. 11
Convolutional Neural Network
© 2020, Retrieva, Inc. All rights reserved. 12
Neural Network
© 2020, Retrieva, Inc. All rights reserved. 13
Input Layer Hidden Layer Output Layer
Deep Neural Network
© 2020, Retrieva, Inc. All rights reserved. 14
Input Layer
Hidden Layers
Output Layer
Convolutional Neural Network
© 2020, Retrieva, Inc. All rights reserved. 15
Input Layer Convolution Pooling Output Layer
© 2020, Retrieva, Inc. All rights reserved. 16
how to use the network
Means to use the model
• Predict
• Infer the label(s) for the data
• Train
• Fix the parameters to obtain beter predictions
• Partial differentiation
• Backward propagation
© 2020, Retrieva, Inc. All rights reserved. 17
Predict(forward)
• Make data pass through layers
© 2020, Retrieva, Inc. All rights reserved. 18
Train(forward->backward)
• Make data pass through layers
© 2020, Retrieva, Inc. All rights reserved. 19
Train(forward->backward)
• go back and adjust parameters as they should be
© 2020, Retrieva, Inc. All rights reserved. 20
t
Update params
• Partial differentiation
• ex). Affine
• 𝑊 =
𝑤11 𝑤12 𝑤13
𝑤21 𝑤22 𝑤23
•
𝜕𝐿
𝜕𝑊
=
𝜕𝐿
𝜕𝑤11
𝜕𝐿
𝜕𝑤12
𝜕𝐿
𝜕𝑤13
𝜕𝐿
𝜕𝑤21
𝜕𝐿
𝜕𝑤22
𝜕𝐿
𝜕𝑤23
© 2020, Retrieva, Inc. All rights reserved. 21
Update params
• Partial differentiation
• ex). Affine
• 𝑊 =
𝑤11 𝑤12 𝑤13
𝑤21 𝑤22 𝑤23
•
𝜕𝐿
𝜕𝑊
=
𝜕𝐿
𝜕𝑤11
𝜕𝐿
𝜕𝑤12
𝜕𝐿
𝜕𝑤13
𝜕𝐿
𝜕𝑤21
𝜕𝐿
𝜕𝑤22
𝜕𝐿
𝜕𝑤23
© 2020, Retrieva, Inc. All rights reserved. 22
Update params
• Backward Propagation
-> chain rule
• ex). Affine
© 2020, Retrieva, Inc. All rights reserved. 23
dot +
X(N, 2)
W(2, 3)
X・W(N, 3) Y(N, 3)
B(3,)
Update params
• Backward Propagation
• ex). Affine
© 2020, Retrieva, Inc. All rights reserved. 24
dot +
X(N, 2)
W(2, 3)
X・W(N, 3) Y(N, 3)
B(3,)
𝜕𝐿
𝜕𝑌
(N, 3)
𝜕𝐿
𝜕𝑌
(N, 3)
𝜕𝐿
𝜕𝑌
(3,) sum of cols(axis=0)
𝐿11 𝐿12 𝐿13
𝐿21 𝐿22 𝐿23
𝜕𝐿
𝜕𝑋
=
𝜕𝐿
𝜕𝑌
∙ 𝑊 𝑇
𝜕𝐿
𝜕𝑊
= 𝑋 𝑇 ∙
𝜕𝐿
𝜕𝑌
CNN in Elixir
© 2020, Retrieva, Inc. All rights reserved. 25
© 2020, Retrieva, Inc. All rights reserved. 26
Simple Two Layer Net
Simple Two Layer Net
• 2 Affine Network
© 2020, Retrieva, Inc. All rights reserved. 27
no type config Activation parameters
1 Affine (784, 100) ReLU 78,500
2 Affine (100, 10) Softmax 1,010
Simple Two Layer Net
• 2 Affine Network
© 2020, Retrieva, Inc. All rights reserved. 28
no type config Activation parameters
1 Affine (784, 100) ReLU 78,500
2 Affine (100, 10) Softmax 1,010
Affine Layer
• Full-Connected Layer
© 2020, Retrieva, Inc. All rights reserved. 29
biasweight
x1
x2
x3
Affine Layer
• Forward
• Y = WX + B
© 2020, Retrieva, Inc. All rights reserved. 30
Simple Two Layer Net
• 2 Affine Network
© 2020, Retrieva, Inc. All rights reserved. 31
no type config Activation parameters
1 Affine (784, 100) ReLU 78,500
2 Affine (100, 10) Softmax 1,010
ReLU
• Forward
• ℎ 𝑥 =
𝑥, 𝑥 > 0
0, 𝑥 ≤ 0
© 2020, Retrieva, Inc. All rights reserved. 32
Simple Two Layer Net
• 2 Affine Network
© 2020, Retrieva, Inc. All rights reserved. 33
no type config Activation parameters
1 Affine (784, 100) ReLU 78,500
2 Affine (100, 10) Softmax 1,010
Softmax
• Forward
• 𝑦 𝑘 =
𝑒𝑥𝑝 𝑎 𝑘
𝑖=0
𝑛 𝑒𝑥𝑝 𝑎 𝑖
© 2020, Retrieva, Inc. All rights reserved. 34
Softmax
• Forward
• 𝑦 𝑘 =
𝑒𝑥𝑝 𝑎 𝑘
𝑖=0
𝑛 𝑒𝑥𝑝 𝑎 𝑖
=
𝑒𝑥𝑝 𝑎 𝑘+𝐶′
𝑖=0
𝑛 𝑒𝑥𝑝 𝑎 𝑖+𝐶′
Due to overflow,
it is better to subtruct
maximum value in the list
© 2020, Retrieva, Inc. All rights reserved. 35
CrossEntropyError
• 𝐸 = − 𝑘 𝑡 𝑘log 𝑦 𝑘
© 2020, Retrieva, Inc. All rights reserved. 36
Softmax with CrossEntropyError
• Backward
• 𝑦 𝑘 − 𝑡 𝑘
© 2020, Retrieva, Inc. All rights reserved. 37
ReLU
• Backward
• ℎ 𝑑𝑜𝑢𝑡 =
𝑑𝑜𝑢𝑡, 𝑥 > 0 𝑤ℎ𝑒𝑟𝑒 𝑥 𝑖𝑠 𝑡ℎ𝑒 𝑖𝑛𝑝𝑢𝑡 𝑜𝑓 𝑓𝑜𝑟𝑤𝑎𝑟𝑑
0, 𝑥 ≤ 0
© 2020, Retrieva, Inc. All rights reserved. 38
Affine Layer
• Backward
• W = W – (XT・dout)
• B = sum(dout, axis=0)
• dx = dout ・WT
© 2020, Retrieva, Inc. All rights reserved. 39
Forward
• protocol
© 2020, Retrieva, Inc. All rights reserved. 40
© 2020, Retrieva, Inc. All rights reserved. 41
© 2020, Retrieva, Inc. All rights reserved. 42
© 2020, Retrieva, Inc. All rights reserved. 43
Simple ConvNet
Simple ConvNet
• 1 Convolution + 2 Affine Network
© 2020, Retrieva, Inc. All rights reserved. 44
no type config Activation parameters
1 Convolution2D 30, (5, 5), 1, 0 ReLU 780
2 MaxPooling (2, 2, 0) - 0
3 Affine (4320, 100) ReLU 432,100
4 Affine (100, 10) Softmax 1,010
im2col
• pick the values in the kernel
© 2020, Retrieva, Inc. All rights reserved. 45
im2col
• pick the values in the kernel
© 2020, Retrieva, Inc. All rights reserved. 46
im2col
• pick the values in the kernel
© 2020, Retrieva, Inc. All rights reserved. 47
0 1 2 3 4
5 6 7 8 9
10 11 12 13 14
15 16 17 18 19
20 21 22 23 24
0 1 5 6
im2col
• pick the values in the kernel
© 2020, Retrieva, Inc. All rights reserved. 48
0 1 2 3 4
5 6 7 8 9
10 11 12 13 14
15 16 17 18 19
20 21 22 23 24
25 26 27 28 29
30 31 32 33 34
35 36 37 38 39
40 41 42 43 44
45 46 47 48 49
0 1 5 6 25 26 30 31
im2col
• pick the values in the kernel
© 2020, Retrieva, Inc. All rights reserved. 49
0 1 2 3 4
5 6 7 8 9
10 11 12 13 14
15 16 17 18 19
20 21 22 23 24
25 26 27 28 29
30 31 32 33 34
35 36 37 38 39
40 41 42 43 44
45 46 47 48 49
0 1 5 6 25 26 30 31
1 2 6 7 26 27 31 32
im2col
• pick the values in the kernel
© 2020, Retrieva, Inc. All rights reserved. 50
0 1 2 3 4
5 6 7 8 9
10 11 12 13 14
15 16 17 18 19
20 21 22 23 24
out_w
im2col
• pick the values in the kernel
• ex). y=1, x=1
© 2020, Retrieva, Inc. All rights reserved. 51
0 1 2 3 4
5 6 7 8 9
10 11 12 13 14
15 16 17 18 19
20 21 22 23 24
im2col
• pick the values in the kernel
• ex). y=1, x=1
© 2020, Retrieva, Inc. All rights reserved. 52
5 6 7 8 9
10 11 12 13 14
15 16 17 18 19
20 21 22 23 24
im2col
• pick the values in the kernel
• ex). y=1, x=1
© 2020, Retrieva, Inc. All rights reserved. 53
5 6 7 8 9
10 11 12 13 14
15 16 17 18 19
20 21 22 23 24
im2col
• pick the values in the kernel
• ex). y=1, x=1
© 2020, Retrieva, Inc. All rights reserved. 54
5 6 7 8 9
10 11 12 13 14
im2col
• pick the values in the kernel
• ex). y=1, x=1
© 2020, Retrieva, Inc. All rights reserved. 55
5 6 7 8 9
10 11 12 13 14
im2col
• pick the values in the kernel
• ex). y=1, x=1
© 2020, Retrieva, Inc. All rights reserved. 56
6 7 8 9
11 12 13 14
im2col
• pick the values in the kernel
• ex). y=1, x=1
© 2020, Retrieva, Inc. All rights reserved. 57
6 7
11 12
im2col
• pick the values in the kernel
• ex). y=1, x=1
© 2020, Retrieva, Inc. All rights reserved. 58
6 7 11 12
im2col
• pick the values in the kernel
• ex). y=1, x=1
© 2020, Retrieva, Inc. All rights reserved. 59
6 7 11 12 31 32 36 37
Simple ConvNet
• 1 Convolution + 2 Affine Network
© 2020, Retrieva, Inc. All rights reserved. 60
no type config Activation parameters
1 Convolution2D 30, (5, 5), 1, 0 ReLU 780
2 MaxPooling2D (2, 2, 0) - 0
3 Affine (4320, 100) ReLU 432,100
4 Affine (100, 10) Softmax 1,010
MaxPooling2D
• Remain maximum value in the kernel
© 2020, Retrieva, Inc. All rights reserved. 61
0 3 1 6
10 4 5 2
1 5 7 1
8 4 2 3
3 2 9 4
3 6 2 8
MaxPooling2D
• Remain maximum value in the kernel
© 2020, Retrieva, Inc. All rights reserved. 62
0 3 1 6
10 4 5 2
1 5 7 1
8 4 2 3
3 2 9 4
3 6 2 8
MaxPooling2D
• Remain maximum value in the kernel
© 2020, Retrieva, Inc. All rights reserved. 63
10 4 5 2
1 5 7 1
8 4 2 3
3 2 9 4
3 6 2 8
6
MaxPooling2D
• Remain maximum value in the kernel
© 2020, Retrieva, Inc. All rights reserved. 64
6
10
7
8
9
8
MaxPooling2D
• Remain maximum value in the kernel
© 2020, Retrieva, Inc. All rights reserved. 65
6 10 7 8
9 8 8 6
5 9 7 8
9 7 10 7
MaxPooling2D
• Forward
© 2020, Retrieva, Inc. All rights reserved. 66
Simple ConvNet
• 1 Convolution + 2 Affine Network
© 2020, Retrieva, Inc. All rights reserved. 67
no type config Activation parameters
1 Convolution2D 30, (5, 5), 1, 0 ReLU 780
2 MaxPooling2D (2, 2, 0) - 0
3 Affine (4320, 100) ReLU 432,100
4 Affine (100, 10) Softmax 1,010
Convolution2D
• Forward
• im2col(2x2 kernel)
© 2020, Retrieva, Inc. All rights reserved. 68
0 1 5 6 25 26 30 31
1 2 6 7 26 27 31 32
2 3 7 8 27 28 32 33
3 4 8 9 28 29 33 34
Convolution2D
• Forward
• im2col ・ WT + B
© 2020, Retrieva, Inc. All rights reserved. 69
0 1 5 6 25 26 30 31
1 2 6 7 26 27 31 32
2 3 7 8 27 28 32 33
3 4 8 9 28 29 33 34
(N, 8)
(8, out_channel)
Convolution2D
• Forward
• im2col ・ WT + B
© 2020, Retrieva, Inc. All rights reserved. 70
0 1 5 6 25 26 30 31
1 2 6 7 26 27 31 32
2 3 7 8 27 28 32 33
3 4 8 9 28 29 33 34
(N, 8)
(8, out_channel)
o1
o1 o2
Convolution2D
• Forward
• im2col ・ WT + B
© 2020, Retrieva, Inc. All rights reserved. 71
0 1 5 6 25 26 30 31
1 2 6 7 26 27 31 32
2 3 7 8 27 28 32 33
3 4 8 9 28 29 33 34
(N, 8)
(8, out_channel)
o1 o2 o3
Convolution2D
• Forward
• im2col ・ WT + B
© 2020, Retrieva, Inc. All rights reserved. 72
0 1 5 6 25 26 30 31
1 2 6 7 26 27 31 32
2 3 7 8 27 28 32 33
3 4 8 9 28 29 33 34
(N, 8)
(8, out_channel)
• Forward
• im2col ・ WT + B
o1 o2 o3
Convolution2D
© 2020, Retrieva, Inc. All rights reserved. 73
0 1 5 6 25 26 30 31
1 2 6 7 26 27 31 32
2 3 7 8 27 28 32 33
3 4 8 9 28 29 33 34
(N, 8)
(8, out_channel)
b1 b2 b3
+
• Forward
• im2col ・ WT + B
o1 o2 o3
Convolution2D
© 2020, Retrieva, Inc. All rights reserved. 74
0 1 5 6 25 26 30 31
1 2 6 7 26 27 31 32
2 3 7 8 27 28 32 33
3 4 8 9 28 29 33 34
(N, 8)
(8, out_channel)
b1 b2 b3
+
(N, out_channel)
Convolution2D
• Forward
• reshape+transpose
© 2020, Retrieva, Inc. All rights reserved. 75
o11 o12 o13
o21 o22 o23
o31 o32 o33
o41 o42 o43
o11 o12 o13
o21 o22 o23
o31 o32 o33
o41 o42 o43
reshape
(batch, height, width, channel)
Convolution2D
• Forward
• reshape+transpose
© 2020, Retrieva, Inc. All rights reserved. 76
o11 o12 o13
o21 o22 o23
o31 o32 o33
o41 o42 o43
o11 o12 o13
o21 o22 o23
o31 o32 o33
o41 o42 o43
reshape
(batch, height, width, channel)
o13 o23
o33 o41
o12 o22
o32 o41
o11 o21
o31 o41
transpose(0, 3, 1, 2)
Convolution2D
• Forward
© 2020, Retrieva, Inc. All rights reserved. 77
MaxPooling2D
• Backward
© 2020, Retrieva, Inc. All rights reserved. 78
d1 d2 d3 d4
d5 d6 d7 d8
d9 d d d
d d d d
0 3 1 6
10 4 5 2
1 5 7 1
8 4 2 3
3 2 9 4
3 6 2 8
im2col
MaxPooling2D
• Backward
© 2020, Retrieva, Inc. All rights reserved. 79
d1 d2 d3 d4
d5 d6 d7 d8
d9 d d d
d d d d
0 3 1 6
10 4 5 2
1 5 7 1
8 4 2 3
3 2 9 4
3 6 2 8
0 3 10 4 1 5 8 4
1 6 5 2 7 1 2 3
3 2 3 6 7 2 12 5
9 4 2 8 8 1 3 8
im2colinput
MaxPooling2D
• Backward
© 2020, Retrieva, Inc. All rights reserved. 80
Convolution2D
• Backward
• dw: colT・dout’
© 2020, Retrieva, Inc. All rights reserved. 81
d1 d2 d3 d4
d5 d6 d7 d8
d9 d d d
d d d d
d11 d12 d13 d14
d21 d22 d23 d24
d31 d32 d33 d34
d41 d42 d43 d44
d51 d52 d53 d54
d61 d62 d63 d64
reshape+transpose(0, 2, 3, 1)
dout’
Convolution2D
• Backward
• dw: colT・dout’
• db: sum of columns
© 2020, Retrieva, Inc. All rights reserved. 82
d1 d2 d3 d4
d5 d6 d7 d8
d9 d d d
d d d d
d11 d12 d13 d14
d21 d22 d23 d24
d31 d32 d33 d34
d41 d42 d43 d44
d51 d52 d53 d54
d61 d62 d63 d64
dout’
Convolution2D
• Backward
• dw: colT・dout’
• db: sum of columns
© 2020, Retrieva, Inc. All rights reserved. 83
d1 d2 d3 d4
d5 d6 d7 d8
d9 d d d
d d d d
d11 d12 d13 d14
d21 d22 d23 d24
d31 d32 d33 d34
d41 d42 d43 d44
d51 d52 d53 d54
d61 d62 d63 d64
Convolution2D
• Backward
• dw: colT・dout’
• db: sum of columns
• dx: same as MaxPooing2D
© 2020, Retrieva, Inc. All rights reserved. 84
d1 d2 d3 d4
d5 d6 d7 d8
d9 d d d
d d d d
0 3 1 6
10 4 5 2
1 5 7 1
8 4 2 3
3 2 9 4
3 6 2 8
0 3 10 4 1 5 8 4
1 6 5 2 7 1 2 3
3 2 3 6 7 2 12 5
9 4 2 8 8 1 3 8
w
im2colinput
Convolution2D
• Backward
© 2020, Retrieva, Inc. All rights reserved. 85
Convolution2D
• Backward
© 2020, Retrieva, Inc. All rights reserved. 86
Result
• MNIST(N, 1, 28, 28)
© 2020, Retrieva, Inc. All rights reserved. 87
© 2020, Retrieva, Inc. All rights reserved. 88
Is this like Functional programming?
Make it functional
• Remove struct!
© 2020, Retrieva, Inc. All rights reserved. 89
Make it functional
• Forward
© 2020, Retrieva, Inc. All rights reserved. 90
Pros and Cons
• Pros
• Simple(pass only as the function needs)
• No protocol needed
• Less memory usage
• Cons
• Pattern match increases
• Doctest does not work with pattern match?
• Huge result lists are displayed
© 2020, Retrieva, Inc. All rights reserved. 91
Pros and Cons
• Pros
• Simple(pass only as the function needs)
• No protocol needed
• Less memory usage
• Cons
• Pattern match increases
• Doctest does not work with pattern match?
• Huge result lists are displayed
© 2020, Retrieva, Inc. All rights reserved. 92
CIFAR10
• 4 Convolution + 2 Affine Network
© 2020, Retrieva, Inc. All rights reserved. 93
no type config Activation parameters
1 Convolution2D 32, (3, 3), 1, 1 ReLU 896
2 Convolution2D 32, (3, 3), 1, 1 ReLU 9,248
3 MaxPooling (2, 2, 0) - 0
4 Dropout 0.25 - 0
5 Convolution2D 64, (3, 3), 1, 1 ReLU 18,496
6 Convolution2D 64, (3, 3), 1, 1 ReLU 36,928
7 MaxPooling (2, 2, 0) - 0
8 Dropout 0.25 - 0
9 Affine (4096, 512) ReLU 2,097,664
10 Dropout 0.5 - 0
4 Affine (512, 10) Softmax 5,130
© 2020, Retrieva, Inc. All rights reserved. 94
Acceleration
Matrex
© 2020, Retrieva, Inc. All rights reserved. 95
Matrex
• Fast matrix manipulation library with CBLAS
© 2020, Retrieva, Inc. All rights reserved. 96
Matrex
• Fast matrix manipulation library with CBLAS
• Problem
• Only for matrix
• Huge cost to create Matrex struct
© 2020, Retrieva, Inc. All rights reserved. 97
NIF
© 2020, Retrieva, Inc. All rights reserved. 98
NIF
• Native Implemented Functions
• Enable to call C/C++ functions
© 2020, Retrieva, Inc. All rights reserved. 99
NIF
• Native Implemented Functions
• Enable to call C/C++ functions
© 2020, Retrieva, Inc. All rights reserved. 100
Bench
• Checked by Benchfella
© 2020, Retrieva, Inc. All rights reserved. 101
Tips
© 2020, Retrieva, Inc. All rights reserved. 102
Use Float for tests
• Numbers are automatically converted to chars
© 2020, Retrieva, Inc. All rights reserved. 103
Memory usage
• Explicitly use processes
• Avoid defstruct
• Do NOT rush data
• Enum.reduce consumes bigger amount of memory
© 2020, Retrieva, Inc. All rights reserved. 104
Future work
© 2020, Retrieva, Inc. All rights reserved. 105
Future work
• Use OpenCL(NIF)
• Implement more layers
• Apply Pelemay
• Apply Cockatrice
© 2020, Retrieva, Inc. All rights reserved. 106
Github
• Release in a few days
https://github.com/muramasa8191/broca
© 2020, Retrieva, Inc. All rights reserved. 107
Reference
[1] K. Saito, “ゼロから作るDeep Learning”, O’REILLY Japan,
2016
© 2020, Retrieva, Inc. All rights reserved. 108
© 2020, Retrieva, Inc. All rights reserved.

Contenu connexe

Tendances

QGATE 0.3: QUANTUM CIRCUIT SIMULATOR
QGATE 0.3: QUANTUM CIRCUIT SIMULATORQGATE 0.3: QUANTUM CIRCUIT SIMULATOR
QGATE 0.3: QUANTUM CIRCUIT SIMULATORNVIDIA Japan
 
IIBMP2019 講演資料「オープンソースで始める深層学習」
IIBMP2019 講演資料「オープンソースで始める深層学習」IIBMP2019 講演資料「オープンソースで始める深層学習」
IIBMP2019 講演資料「オープンソースで始める深層学習」Preferred Networks
 
Large scale logistic regression and linear support vector machines using spark
Large scale logistic regression and linear support vector machines using sparkLarge scale logistic regression and linear support vector machines using spark
Large scale logistic regression and linear support vector machines using sparkMila, Université de Montréal
 
Visualizing database performance hotsos 13-v2
Visualizing database performance   hotsos 13-v2Visualizing database performance   hotsos 13-v2
Visualizing database performance hotsos 13-v2Gwen (Chen) Shapira
 
An FPGA-based acceleration methodology and performance model for iterative st...
An FPGA-based acceleration methodology and performance model for iterative st...An FPGA-based acceleration methodology and performance model for iterative st...
An FPGA-based acceleration methodology and performance model for iterative st...NECST Lab @ Politecnico di Milano
 
A Platform for Accelerating Machine Learning Applications
 A Platform for Accelerating Machine Learning Applications A Platform for Accelerating Machine Learning Applications
A Platform for Accelerating Machine Learning ApplicationsNVIDIA Taiwan
 
PL/CUDA - Fusion of HPC Grade Power with In-Database Analytics
PL/CUDA - Fusion of HPC Grade Power with In-Database AnalyticsPL/CUDA - Fusion of HPC Grade Power with In-Database Analytics
PL/CUDA - Fusion of HPC Grade Power with In-Database AnalyticsKohei KaiGai
 
20181212 - PGconfASIA - LT - English
20181212 - PGconfASIA - LT - English20181212 - PGconfASIA - LT - English
20181212 - PGconfASIA - LT - EnglishKohei KaiGai
 
PFN Summer Internship 2019 / Kenshin Abe: Extension of Chainer-Chemistry for ...
PFN Summer Internship 2019 / Kenshin Abe: Extension of Chainer-Chemistry for ...PFN Summer Internship 2019 / Kenshin Abe: Extension of Chainer-Chemistry for ...
PFN Summer Internship 2019 / Kenshin Abe: Extension of Chainer-Chemistry for ...Preferred Networks
 
Distributed Multi-GPU Computing with Dask, CuPy and RAPIDS
Distributed Multi-GPU Computing with Dask, CuPy and RAPIDSDistributed Multi-GPU Computing with Dask, CuPy and RAPIDS
Distributed Multi-GPU Computing with Dask, CuPy and RAPIDSPeterAndreasEntschev
 
2014-4Q-OpenStack-Fall-presentation-public-20150310a
2014-4Q-OpenStack-Fall-presentation-public-20150310a2014-4Q-OpenStack-Fall-presentation-public-20150310a
2014-4Q-OpenStack-Fall-presentation-public-20150310aKen Igarashi
 
PyTorch crash course
PyTorch crash coursePyTorch crash course
PyTorch crash courseNader Karimi
 
Introduction to Deep Learning (NVIDIA)
Introduction to Deep Learning (NVIDIA)Introduction to Deep Learning (NVIDIA)
Introduction to Deep Learning (NVIDIA)Rakuten Group, Inc.
 
JAWS-UG HPC #17 - Supercomputing'19 参加報告 - PFN 福田圭祐
JAWS-UG HPC #17 - Supercomputing'19 参加報告 - PFN 福田圭祐JAWS-UG HPC #17 - Supercomputing'19 参加報告 - PFN 福田圭祐
JAWS-UG HPC #17 - Supercomputing'19 参加報告 - PFN 福田圭祐Preferred Networks
 
Svm map reduce_slides
Svm map reduce_slidesSvm map reduce_slides
Svm map reduce_slidesSara Asher
 
Data Science Connect, July 22nd 2014 @IBM Innovation Center Zurich
Data Science Connect, July 22nd 2014 @IBM Innovation Center ZurichData Science Connect, July 22nd 2014 @IBM Innovation Center Zurich
Data Science Connect, July 22nd 2014 @IBM Innovation Center ZurichRomeo Kienzler
 
Parallel Implementation of K Means Clustering on CUDA
Parallel Implementation of K Means Clustering on CUDAParallel Implementation of K Means Clustering on CUDA
Parallel Implementation of K Means Clustering on CUDAprithan
 

Tendances (20)

QGATE 0.3: QUANTUM CIRCUIT SIMULATOR
QGATE 0.3: QUANTUM CIRCUIT SIMULATORQGATE 0.3: QUANTUM CIRCUIT SIMULATOR
QGATE 0.3: QUANTUM CIRCUIT SIMULATOR
 
IIBMP2019 講演資料「オープンソースで始める深層学習」
IIBMP2019 講演資料「オープンソースで始める深層学習」IIBMP2019 講演資料「オープンソースで始める深層学習」
IIBMP2019 講演資料「オープンソースで始める深層学習」
 
Large scale logistic regression and linear support vector machines using spark
Large scale logistic regression and linear support vector machines using sparkLarge scale logistic regression and linear support vector machines using spark
Large scale logistic regression and linear support vector machines using spark
 
Visualizing database performance hotsos 13-v2
Visualizing database performance   hotsos 13-v2Visualizing database performance   hotsos 13-v2
Visualizing database performance hotsos 13-v2
 
An FPGA-based acceleration methodology and performance model for iterative st...
An FPGA-based acceleration methodology and performance model for iterative st...An FPGA-based acceleration methodology and performance model for iterative st...
An FPGA-based acceleration methodology and performance model for iterative st...
 
A Platform for Accelerating Machine Learning Applications
 A Platform for Accelerating Machine Learning Applications A Platform for Accelerating Machine Learning Applications
A Platform for Accelerating Machine Learning Applications
 
ANPR FPGA Workshop
ANPR FPGA WorkshopANPR FPGA Workshop
ANPR FPGA Workshop
 
Getting started with image processing using Matlab
Getting started with image processing using MatlabGetting started with image processing using Matlab
Getting started with image processing using Matlab
 
PL/CUDA - Fusion of HPC Grade Power with In-Database Analytics
PL/CUDA - Fusion of HPC Grade Power with In-Database AnalyticsPL/CUDA - Fusion of HPC Grade Power with In-Database Analytics
PL/CUDA - Fusion of HPC Grade Power with In-Database Analytics
 
20181212 - PGconfASIA - LT - English
20181212 - PGconfASIA - LT - English20181212 - PGconfASIA - LT - English
20181212 - PGconfASIA - LT - English
 
Latest HPC News from NVIDIA
Latest HPC News from NVIDIALatest HPC News from NVIDIA
Latest HPC News from NVIDIA
 
PFN Summer Internship 2019 / Kenshin Abe: Extension of Chainer-Chemistry for ...
PFN Summer Internship 2019 / Kenshin Abe: Extension of Chainer-Chemistry for ...PFN Summer Internship 2019 / Kenshin Abe: Extension of Chainer-Chemistry for ...
PFN Summer Internship 2019 / Kenshin Abe: Extension of Chainer-Chemistry for ...
 
Distributed Multi-GPU Computing with Dask, CuPy and RAPIDS
Distributed Multi-GPU Computing with Dask, CuPy and RAPIDSDistributed Multi-GPU Computing with Dask, CuPy and RAPIDS
Distributed Multi-GPU Computing with Dask, CuPy and RAPIDS
 
2014-4Q-OpenStack-Fall-presentation-public-20150310a
2014-4Q-OpenStack-Fall-presentation-public-20150310a2014-4Q-OpenStack-Fall-presentation-public-20150310a
2014-4Q-OpenStack-Fall-presentation-public-20150310a
 
PyTorch crash course
PyTorch crash coursePyTorch crash course
PyTorch crash course
 
Introduction to Deep Learning (NVIDIA)
Introduction to Deep Learning (NVIDIA)Introduction to Deep Learning (NVIDIA)
Introduction to Deep Learning (NVIDIA)
 
JAWS-UG HPC #17 - Supercomputing'19 参加報告 - PFN 福田圭祐
JAWS-UG HPC #17 - Supercomputing'19 参加報告 - PFN 福田圭祐JAWS-UG HPC #17 - Supercomputing'19 参加報告 - PFN 福田圭祐
JAWS-UG HPC #17 - Supercomputing'19 参加報告 - PFN 福田圭祐
 
Svm map reduce_slides
Svm map reduce_slidesSvm map reduce_slides
Svm map reduce_slides
 
Data Science Connect, July 22nd 2014 @IBM Innovation Center Zurich
Data Science Connect, July 22nd 2014 @IBM Innovation Center ZurichData Science Connect, July 22nd 2014 @IBM Innovation Center Zurich
Data Science Connect, July 22nd 2014 @IBM Innovation Center Zurich
 
Parallel Implementation of K Means Clustering on CUDA
Parallel Implementation of K Means Clustering on CUDAParallel Implementation of K Means Clustering on CUDA
Parallel Implementation of K Means Clustering on CUDA
 

Similaire à Functional CNN in elixir

XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Ora...
XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Ora...XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Ora...
XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Ora...The Linux Foundation
 
Taming the Tiger: Tips and Tricks for Using Telegraf
Taming the Tiger: Tips and Tricks for Using TelegrafTaming the Tiger: Tips and Tricks for Using Telegraf
Taming the Tiger: Tips and Tricks for Using TelegrafInfluxData
 
Application Optimisation using OpenPOWER and Power 9 systems
Application Optimisation using OpenPOWER and Power 9 systemsApplication Optimisation using OpenPOWER and Power 9 systems
Application Optimisation using OpenPOWER and Power 9 systemsGanesan Narayanasamy
 
C++ and Assembly: Debugging and Reverse Engineering
C++ and Assembly: Debugging and Reverse EngineeringC++ and Assembly: Debugging and Reverse Engineering
C++ and Assembly: Debugging and Reverse Engineeringcorehard_by
 
“Quantum” Performance Effects: beyond the Core
“Quantum” Performance Effects: beyond the Core“Quantum” Performance Effects: beyond the Core
“Quantum” Performance Effects: beyond the CoreC4Media
 
InfluxDB IOx Tech Talks: A Rusty Introduction to Apache Arrow and How it App...
InfluxDB IOx Tech Talks:  A Rusty Introduction to Apache Arrow and How it App...InfluxDB IOx Tech Talks:  A Rusty Introduction to Apache Arrow and How it App...
InfluxDB IOx Tech Talks: A Rusty Introduction to Apache Arrow and How it App...InfluxData
 
HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...
HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...
HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...Yuji Kubota
 
New Directions for Mahout
New Directions for MahoutNew Directions for Mahout
New Directions for MahoutTed Dunning
 
NTTドコモ様 導入事例 OpenStack Summit 2015 Tokyo 講演「After One year of OpenStack Cloud...
NTTドコモ様 導入事例 OpenStack Summit 2015 Tokyo 講演「After One year of OpenStack Cloud...NTTドコモ様 導入事例 OpenStack Summit 2015 Tokyo 講演「After One year of OpenStack Cloud...
NTTドコモ様 導入事例 OpenStack Summit 2015 Tokyo 講演「After One year of OpenStack Cloud...VirtualTech Japan Inc.
 
"Quantum" Performance Effects
"Quantum" Performance Effects"Quantum" Performance Effects
"Quantum" Performance EffectsSergey Kuksenko
 
Basic Tutorial for Robotic Arm
Basic Tutorial for Robotic ArmBasic Tutorial for Robotic Arm
Basic Tutorial for Robotic ArmYu Wei Chen
 
Proven and Emerging Use Cases of Software Defined Network
Proven and Emerging Use Cases of Software Defined NetworkProven and Emerging Use Cases of Software Defined Network
Proven and Emerging Use Cases of Software Defined NetworkOpen Networking Summits
 
Cassandra Tools and Distributed Administration (Jeffrey Berger, Knewton) | C*...
Cassandra Tools and Distributed Administration (Jeffrey Berger, Knewton) | C*...Cassandra Tools and Distributed Administration (Jeffrey Berger, Knewton) | C*...
Cassandra Tools and Distributed Administration (Jeffrey Berger, Knewton) | C*...DataStax
 
Macy's: Changing Engines in Mid-Flight
Macy's: Changing Engines in Mid-FlightMacy's: Changing Engines in Mid-Flight
Macy's: Changing Engines in Mid-FlightDataStax Academy
 
The System of Automatic Searching for Vulnerabilities or how to use Taint Ana...
The System of Automatic Searching for Vulnerabilities or how to use Taint Ana...The System of Automatic Searching for Vulnerabilities or how to use Taint Ana...
The System of Automatic Searching for Vulnerabilities or how to use Taint Ana...Positive Hack Days
 
SDVIs and In-Situ Visualization on TACC's Stampede
SDVIs and In-Situ Visualization on TACC's StampedeSDVIs and In-Situ Visualization on TACC's Stampede
SDVIs and In-Situ Visualization on TACC's StampedeIntel® Software
 
Kernel Recipes 2018 - Mitigating Spectre and Meltdown (and L1TF) - David Wood...
Kernel Recipes 2018 - Mitigating Spectre and Meltdown (and L1TF) - David Wood...Kernel Recipes 2018 - Mitigating Spectre and Meltdown (and L1TF) - David Wood...
Kernel Recipes 2018 - Mitigating Spectre and Meltdown (and L1TF) - David Wood...Anne Nicolas
 

Similaire à Functional CNN in elixir (20)

XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Ora...
XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Ora...XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Ora...
XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Ora...
 
Taming the Tiger: Tips and Tricks for Using Telegraf
Taming the Tiger: Tips and Tricks for Using TelegrafTaming the Tiger: Tips and Tricks for Using Telegraf
Taming the Tiger: Tips and Tricks for Using Telegraf
 
Application Optimisation using OpenPOWER and Power 9 systems
Application Optimisation using OpenPOWER and Power 9 systemsApplication Optimisation using OpenPOWER and Power 9 systems
Application Optimisation using OpenPOWER and Power 9 systems
 
C++ and Assembly: Debugging and Reverse Engineering
C++ and Assembly: Debugging and Reverse EngineeringC++ and Assembly: Debugging and Reverse Engineering
C++ and Assembly: Debugging and Reverse Engineering
 
“Quantum” Performance Effects: beyond the Core
“Quantum” Performance Effects: beyond the Core“Quantum” Performance Effects: beyond the Core
“Quantum” Performance Effects: beyond the Core
 
Abhi monal
Abhi monalAbhi monal
Abhi monal
 
InfluxDB IOx Tech Talks: A Rusty Introduction to Apache Arrow and How it App...
InfluxDB IOx Tech Talks:  A Rusty Introduction to Apache Arrow and How it App...InfluxDB IOx Tech Talks:  A Rusty Introduction to Apache Arrow and How it App...
InfluxDB IOx Tech Talks: A Rusty Introduction to Apache Arrow and How it App...
 
HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...
HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...
HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...
 
New Directions for Mahout
New Directions for MahoutNew Directions for Mahout
New Directions for Mahout
 
NTTドコモ様 導入事例 OpenStack Summit 2015 Tokyo 講演「After One year of OpenStack Cloud...
NTTドコモ様 導入事例 OpenStack Summit 2015 Tokyo 講演「After One year of OpenStack Cloud...NTTドコモ様 導入事例 OpenStack Summit 2015 Tokyo 講演「After One year of OpenStack Cloud...
NTTドコモ様 導入事例 OpenStack Summit 2015 Tokyo 講演「After One year of OpenStack Cloud...
 
"Quantum" Performance Effects
"Quantum" Performance Effects"Quantum" Performance Effects
"Quantum" Performance Effects
 
Basic Tutorial for Robotic Arm
Basic Tutorial for Robotic ArmBasic Tutorial for Robotic Arm
Basic Tutorial for Robotic Arm
 
Proven and Emerging Use Cases of Software Defined Network
Proven and Emerging Use Cases of Software Defined NetworkProven and Emerging Use Cases of Software Defined Network
Proven and Emerging Use Cases of Software Defined Network
 
New directions for mahout
New directions for mahoutNew directions for mahout
New directions for mahout
 
Cassandra Tools and Distributed Administration (Jeffrey Berger, Knewton) | C*...
Cassandra Tools and Distributed Administration (Jeffrey Berger, Knewton) | C*...Cassandra Tools and Distributed Administration (Jeffrey Berger, Knewton) | C*...
Cassandra Tools and Distributed Administration (Jeffrey Berger, Knewton) | C*...
 
2020 icldla-updated
2020 icldla-updated2020 icldla-updated
2020 icldla-updated
 
Macy's: Changing Engines in Mid-Flight
Macy's: Changing Engines in Mid-FlightMacy's: Changing Engines in Mid-Flight
Macy's: Changing Engines in Mid-Flight
 
The System of Automatic Searching for Vulnerabilities or how to use Taint Ana...
The System of Automatic Searching for Vulnerabilities or how to use Taint Ana...The System of Automatic Searching for Vulnerabilities or how to use Taint Ana...
The System of Automatic Searching for Vulnerabilities or how to use Taint Ana...
 
SDVIs and In-Situ Visualization on TACC's Stampede
SDVIs and In-Situ Visualization on TACC's StampedeSDVIs and In-Situ Visualization on TACC's Stampede
SDVIs and In-Situ Visualization on TACC's Stampede
 
Kernel Recipes 2018 - Mitigating Spectre and Meltdown (and L1TF) - David Wood...
Kernel Recipes 2018 - Mitigating Spectre and Meltdown (and L1TF) - David Wood...Kernel Recipes 2018 - Mitigating Spectre and Meltdown (and L1TF) - David Wood...
Kernel Recipes 2018 - Mitigating Spectre and Meltdown (and L1TF) - David Wood...
 

Dernier

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 

Dernier (20)

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 

Functional CNN in elixir

  • 1. Functional CNN in Elixir Masayoshi Tamura Retrieva, Inc. © 2020, Retrieva, Inc. All rights reserved.
  • 2. Agenda • Self-introduction • What is Elixir • What is Convolutional Newral Network(CNN) • CNN in Elixir • Functional CNN • Acceleration • Tips • Future work © 2020, Retrieva, Inc. All rights reserved. 2
  • 3. Who am I? Self-introduction © 2020, Retrieva, Inc. All rights reserved. 3 Java C C# C++ JavaScript Python Elixir Haskell prolog R matlab Lua php SAS SVF Objective-C cocos2d-x AngularJS jQuery D3.js TwitterAPI Docker CircleCI Apache Tomcat OpenGL GLSL WebGL OpenCL Oracle MySQL PostgreSQL SQLServer memcached Spring Seasar2 Servlet Jenkins Nginx WebSphere RPM Hadoop maven ProtocolBuffer gRPC Tensorflow Chainer scikit-learn k-means Naïve Bayes Classifier Random Forest Ray Tracer Photon Mapper Dynamic Programing Greedy Algorithm Binary Indexed Tree Segement Tree
  • 4. Masayoshi Tamura • Educational Background |> Waseda University Senior High School |> Waseda University(BAPsy) |> Oregon State University(MEng) • Engineering Career |> System Development Company |> Mobile Game Development Company |> Freelance Smartphone Game Developer |> Retrieva © 2020, Retrieva, Inc. All rights reserved. 4
  • 5. Masayoshi Tamura • Community |> fukuoka.ex |> Japan Android Group • Hobby |> Boxing |> Bouldering |> Footsal |> Rock Festival |> Sake © 2020, Retrieva, Inc. All rights reserved. 5
  • 6. My Events in 2019 • Events |> ElixirConf JP 2019 Lightning Talk |> Forkwell press interview |> Elixir Advent Calendar 2019 Day 18 |> fukuoka.ex Advent Calendar 2019 Day 17 © 2020, Retrieva, Inc. All rights reserved. 6
  • 7. © 2020, Retrieva, Inc. All rights reserved. 7 First of all, why Deep Learning in Elixir?
  • 8. Motivation • Fast training on the machine without CUDA • To learn how deep learning is working • Favorite Language • No practical library in Elixir so far • Ecosystem is growing © 2020, Retrieva, Inc. All rights reserved. 8
  • 9. Resource • My implementation is based on “DeepLeening from scratch” written by Koki Saito[1] https://github.com/oreilly-japan/deep-learning-from-scratch © 2020, Retrieva, Inc. All rights reserved. 9
  • 10. What is Elixir © 2020, Retrieva, Inc. All rights reserved. 10
  • 11. Elixir • Functional Programming Language • Pipe |> Operator • BEAM(Bogdan's Erlang Abstract Machine) = Erlang VM • Immutable • Concurrency • Failure Resistance • Not assignment but binding • Availability • Let it crash © 2020, Retrieva, Inc. All rights reserved. 11
  • 12. Convolutional Neural Network © 2020, Retrieva, Inc. All rights reserved. 12
  • 13. Neural Network © 2020, Retrieva, Inc. All rights reserved. 13 Input Layer Hidden Layer Output Layer
  • 14. Deep Neural Network © 2020, Retrieva, Inc. All rights reserved. 14 Input Layer Hidden Layers Output Layer
  • 15. Convolutional Neural Network © 2020, Retrieva, Inc. All rights reserved. 15 Input Layer Convolution Pooling Output Layer
  • 16. © 2020, Retrieva, Inc. All rights reserved. 16 how to use the network
  • 17. Means to use the model • Predict • Infer the label(s) for the data • Train • Fix the parameters to obtain beter predictions • Partial differentiation • Backward propagation © 2020, Retrieva, Inc. All rights reserved. 17
  • 18. Predict(forward) • Make data pass through layers © 2020, Retrieva, Inc. All rights reserved. 18
  • 19. Train(forward->backward) • Make data pass through layers © 2020, Retrieva, Inc. All rights reserved. 19
  • 20. Train(forward->backward) • go back and adjust parameters as they should be © 2020, Retrieva, Inc. All rights reserved. 20 t
  • 21. Update params • Partial differentiation • ex). Affine • 𝑊 = 𝑤11 𝑤12 𝑤13 𝑤21 𝑤22 𝑤23 • 𝜕𝐿 𝜕𝑊 = 𝜕𝐿 𝜕𝑤11 𝜕𝐿 𝜕𝑤12 𝜕𝐿 𝜕𝑤13 𝜕𝐿 𝜕𝑤21 𝜕𝐿 𝜕𝑤22 𝜕𝐿 𝜕𝑤23 © 2020, Retrieva, Inc. All rights reserved. 21
  • 22. Update params • Partial differentiation • ex). Affine • 𝑊 = 𝑤11 𝑤12 𝑤13 𝑤21 𝑤22 𝑤23 • 𝜕𝐿 𝜕𝑊 = 𝜕𝐿 𝜕𝑤11 𝜕𝐿 𝜕𝑤12 𝜕𝐿 𝜕𝑤13 𝜕𝐿 𝜕𝑤21 𝜕𝐿 𝜕𝑤22 𝜕𝐿 𝜕𝑤23 © 2020, Retrieva, Inc. All rights reserved. 22
  • 23. Update params • Backward Propagation -> chain rule • ex). Affine © 2020, Retrieva, Inc. All rights reserved. 23 dot + X(N, 2) W(2, 3) X・W(N, 3) Y(N, 3) B(3,)
  • 24. Update params • Backward Propagation • ex). Affine © 2020, Retrieva, Inc. All rights reserved. 24 dot + X(N, 2) W(2, 3) X・W(N, 3) Y(N, 3) B(3,) 𝜕𝐿 𝜕𝑌 (N, 3) 𝜕𝐿 𝜕𝑌 (N, 3) 𝜕𝐿 𝜕𝑌 (3,) sum of cols(axis=0) 𝐿11 𝐿12 𝐿13 𝐿21 𝐿22 𝐿23 𝜕𝐿 𝜕𝑋 = 𝜕𝐿 𝜕𝑌 ∙ 𝑊 𝑇 𝜕𝐿 𝜕𝑊 = 𝑋 𝑇 ∙ 𝜕𝐿 𝜕𝑌
  • 25. CNN in Elixir © 2020, Retrieva, Inc. All rights reserved. 25
  • 26. © 2020, Retrieva, Inc. All rights reserved. 26 Simple Two Layer Net
  • 27. Simple Two Layer Net • 2 Affine Network © 2020, Retrieva, Inc. All rights reserved. 27 no type config Activation parameters 1 Affine (784, 100) ReLU 78,500 2 Affine (100, 10) Softmax 1,010
  • 28. Simple Two Layer Net • 2 Affine Network © 2020, Retrieva, Inc. All rights reserved. 28 no type config Activation parameters 1 Affine (784, 100) ReLU 78,500 2 Affine (100, 10) Softmax 1,010
  • 29. Affine Layer • Full-Connected Layer © 2020, Retrieva, Inc. All rights reserved. 29 biasweight x1 x2 x3
  • 30. Affine Layer • Forward • Y = WX + B © 2020, Retrieva, Inc. All rights reserved. 30
  • 31. Simple Two Layer Net • 2 Affine Network © 2020, Retrieva, Inc. All rights reserved. 31 no type config Activation parameters 1 Affine (784, 100) ReLU 78,500 2 Affine (100, 10) Softmax 1,010
  • 32. ReLU • Forward • ℎ 𝑥 = 𝑥, 𝑥 > 0 0, 𝑥 ≤ 0 © 2020, Retrieva, Inc. All rights reserved. 32
  • 33. Simple Two Layer Net • 2 Affine Network © 2020, Retrieva, Inc. All rights reserved. 33 no type config Activation parameters 1 Affine (784, 100) ReLU 78,500 2 Affine (100, 10) Softmax 1,010
  • 34. Softmax • Forward • 𝑦 𝑘 = 𝑒𝑥𝑝 𝑎 𝑘 𝑖=0 𝑛 𝑒𝑥𝑝 𝑎 𝑖 © 2020, Retrieva, Inc. All rights reserved. 34
  • 35. Softmax • Forward • 𝑦 𝑘 = 𝑒𝑥𝑝 𝑎 𝑘 𝑖=0 𝑛 𝑒𝑥𝑝 𝑎 𝑖 = 𝑒𝑥𝑝 𝑎 𝑘+𝐶′ 𝑖=0 𝑛 𝑒𝑥𝑝 𝑎 𝑖+𝐶′ Due to overflow, it is better to subtruct maximum value in the list © 2020, Retrieva, Inc. All rights reserved. 35
  • 36. CrossEntropyError • 𝐸 = − 𝑘 𝑡 𝑘log 𝑦 𝑘 © 2020, Retrieva, Inc. All rights reserved. 36
  • 37. Softmax with CrossEntropyError • Backward • 𝑦 𝑘 − 𝑡 𝑘 © 2020, Retrieva, Inc. All rights reserved. 37
  • 38. ReLU • Backward • ℎ 𝑑𝑜𝑢𝑡 = 𝑑𝑜𝑢𝑡, 𝑥 > 0 𝑤ℎ𝑒𝑟𝑒 𝑥 𝑖𝑠 𝑡ℎ𝑒 𝑖𝑛𝑝𝑢𝑡 𝑜𝑓 𝑓𝑜𝑟𝑤𝑎𝑟𝑑 0, 𝑥 ≤ 0 © 2020, Retrieva, Inc. All rights reserved. 38
  • 39. Affine Layer • Backward • W = W – (XT・dout) • B = sum(dout, axis=0) • dx = dout ・WT © 2020, Retrieva, Inc. All rights reserved. 39
  • 40. Forward • protocol © 2020, Retrieva, Inc. All rights reserved. 40
  • 41. © 2020, Retrieva, Inc. All rights reserved. 41
  • 42. © 2020, Retrieva, Inc. All rights reserved. 42
  • 43. © 2020, Retrieva, Inc. All rights reserved. 43 Simple ConvNet
  • 44. Simple ConvNet • 1 Convolution + 2 Affine Network © 2020, Retrieva, Inc. All rights reserved. 44 no type config Activation parameters 1 Convolution2D 30, (5, 5), 1, 0 ReLU 780 2 MaxPooling (2, 2, 0) - 0 3 Affine (4320, 100) ReLU 432,100 4 Affine (100, 10) Softmax 1,010
  • 45. im2col • pick the values in the kernel © 2020, Retrieva, Inc. All rights reserved. 45
  • 46. im2col • pick the values in the kernel © 2020, Retrieva, Inc. All rights reserved. 46
  • 47. im2col • pick the values in the kernel © 2020, Retrieva, Inc. All rights reserved. 47 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 0 1 5 6
  • 48. im2col • pick the values in the kernel © 2020, Retrieva, Inc. All rights reserved. 48 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 0 1 5 6 25 26 30 31
  • 49. im2col • pick the values in the kernel © 2020, Retrieva, Inc. All rights reserved. 49 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 0 1 5 6 25 26 30 31 1 2 6 7 26 27 31 32
  • 50. im2col • pick the values in the kernel © 2020, Retrieva, Inc. All rights reserved. 50 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 out_w
  • 51. im2col • pick the values in the kernel • ex). y=1, x=1 © 2020, Retrieva, Inc. All rights reserved. 51 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
  • 52. im2col • pick the values in the kernel • ex). y=1, x=1 © 2020, Retrieva, Inc. All rights reserved. 52 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
  • 53. im2col • pick the values in the kernel • ex). y=1, x=1 © 2020, Retrieva, Inc. All rights reserved. 53 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
  • 54. im2col • pick the values in the kernel • ex). y=1, x=1 © 2020, Retrieva, Inc. All rights reserved. 54 5 6 7 8 9 10 11 12 13 14
  • 55. im2col • pick the values in the kernel • ex). y=1, x=1 © 2020, Retrieva, Inc. All rights reserved. 55 5 6 7 8 9 10 11 12 13 14
  • 56. im2col • pick the values in the kernel • ex). y=1, x=1 © 2020, Retrieva, Inc. All rights reserved. 56 6 7 8 9 11 12 13 14
  • 57. im2col • pick the values in the kernel • ex). y=1, x=1 © 2020, Retrieva, Inc. All rights reserved. 57 6 7 11 12
  • 58. im2col • pick the values in the kernel • ex). y=1, x=1 © 2020, Retrieva, Inc. All rights reserved. 58 6 7 11 12
  • 59. im2col • pick the values in the kernel • ex). y=1, x=1 © 2020, Retrieva, Inc. All rights reserved. 59 6 7 11 12 31 32 36 37
  • 60. Simple ConvNet • 1 Convolution + 2 Affine Network © 2020, Retrieva, Inc. All rights reserved. 60 no type config Activation parameters 1 Convolution2D 30, (5, 5), 1, 0 ReLU 780 2 MaxPooling2D (2, 2, 0) - 0 3 Affine (4320, 100) ReLU 432,100 4 Affine (100, 10) Softmax 1,010
  • 61. MaxPooling2D • Remain maximum value in the kernel © 2020, Retrieva, Inc. All rights reserved. 61 0 3 1 6 10 4 5 2 1 5 7 1 8 4 2 3 3 2 9 4 3 6 2 8
  • 62. MaxPooling2D • Remain maximum value in the kernel © 2020, Retrieva, Inc. All rights reserved. 62 0 3 1 6 10 4 5 2 1 5 7 1 8 4 2 3 3 2 9 4 3 6 2 8
  • 63. MaxPooling2D • Remain maximum value in the kernel © 2020, Retrieva, Inc. All rights reserved. 63 10 4 5 2 1 5 7 1 8 4 2 3 3 2 9 4 3 6 2 8 6
  • 64. MaxPooling2D • Remain maximum value in the kernel © 2020, Retrieva, Inc. All rights reserved. 64 6 10 7 8 9 8
  • 65. MaxPooling2D • Remain maximum value in the kernel © 2020, Retrieva, Inc. All rights reserved. 65 6 10 7 8 9 8 8 6 5 9 7 8 9 7 10 7
  • 66. MaxPooling2D • Forward © 2020, Retrieva, Inc. All rights reserved. 66
  • 67. Simple ConvNet • 1 Convolution + 2 Affine Network © 2020, Retrieva, Inc. All rights reserved. 67 no type config Activation parameters 1 Convolution2D 30, (5, 5), 1, 0 ReLU 780 2 MaxPooling2D (2, 2, 0) - 0 3 Affine (4320, 100) ReLU 432,100 4 Affine (100, 10) Softmax 1,010
  • 68. Convolution2D • Forward • im2col(2x2 kernel) © 2020, Retrieva, Inc. All rights reserved. 68 0 1 5 6 25 26 30 31 1 2 6 7 26 27 31 32 2 3 7 8 27 28 32 33 3 4 8 9 28 29 33 34
  • 69. Convolution2D • Forward • im2col ・ WT + B © 2020, Retrieva, Inc. All rights reserved. 69 0 1 5 6 25 26 30 31 1 2 6 7 26 27 31 32 2 3 7 8 27 28 32 33 3 4 8 9 28 29 33 34 (N, 8) (8, out_channel)
  • 70. Convolution2D • Forward • im2col ・ WT + B © 2020, Retrieva, Inc. All rights reserved. 70 0 1 5 6 25 26 30 31 1 2 6 7 26 27 31 32 2 3 7 8 27 28 32 33 3 4 8 9 28 29 33 34 (N, 8) (8, out_channel) o1
  • 71. o1 o2 Convolution2D • Forward • im2col ・ WT + B © 2020, Retrieva, Inc. All rights reserved. 71 0 1 5 6 25 26 30 31 1 2 6 7 26 27 31 32 2 3 7 8 27 28 32 33 3 4 8 9 28 29 33 34 (N, 8) (8, out_channel)
  • 72. o1 o2 o3 Convolution2D • Forward • im2col ・ WT + B © 2020, Retrieva, Inc. All rights reserved. 72 0 1 5 6 25 26 30 31 1 2 6 7 26 27 31 32 2 3 7 8 27 28 32 33 3 4 8 9 28 29 33 34 (N, 8) (8, out_channel)
  • 73. • Forward • im2col ・ WT + B o1 o2 o3 Convolution2D © 2020, Retrieva, Inc. All rights reserved. 73 0 1 5 6 25 26 30 31 1 2 6 7 26 27 31 32 2 3 7 8 27 28 32 33 3 4 8 9 28 29 33 34 (N, 8) (8, out_channel) b1 b2 b3 +
  • 74. • Forward • im2col ・ WT + B o1 o2 o3 Convolution2D © 2020, Retrieva, Inc. All rights reserved. 74 0 1 5 6 25 26 30 31 1 2 6 7 26 27 31 32 2 3 7 8 27 28 32 33 3 4 8 9 28 29 33 34 (N, 8) (8, out_channel) b1 b2 b3 + (N, out_channel)
  • 75. Convolution2D • Forward • reshape+transpose © 2020, Retrieva, Inc. All rights reserved. 75 o11 o12 o13 o21 o22 o23 o31 o32 o33 o41 o42 o43 o11 o12 o13 o21 o22 o23 o31 o32 o33 o41 o42 o43 reshape (batch, height, width, channel)
  • 76. Convolution2D • Forward • reshape+transpose © 2020, Retrieva, Inc. All rights reserved. 76 o11 o12 o13 o21 o22 o23 o31 o32 o33 o41 o42 o43 o11 o12 o13 o21 o22 o23 o31 o32 o33 o41 o42 o43 reshape (batch, height, width, channel) o13 o23 o33 o41 o12 o22 o32 o41 o11 o21 o31 o41 transpose(0, 3, 1, 2)
  • 77. Convolution2D • Forward © 2020, Retrieva, Inc. All rights reserved. 77
  • 78. MaxPooling2D • Backward © 2020, Retrieva, Inc. All rights reserved. 78 d1 d2 d3 d4 d5 d6 d7 d8 d9 d d d d d d d 0 3 1 6 10 4 5 2 1 5 7 1 8 4 2 3 3 2 9 4 3 6 2 8 im2col
  • 79. MaxPooling2D • Backward © 2020, Retrieva, Inc. All rights reserved. 79 d1 d2 d3 d4 d5 d6 d7 d8 d9 d d d d d d d 0 3 1 6 10 4 5 2 1 5 7 1 8 4 2 3 3 2 9 4 3 6 2 8 0 3 10 4 1 5 8 4 1 6 5 2 7 1 2 3 3 2 3 6 7 2 12 5 9 4 2 8 8 1 3 8 im2colinput
  • 80. MaxPooling2D • Backward © 2020, Retrieva, Inc. All rights reserved. 80
  • 81. Convolution2D • Backward • dw: colT・dout’ © 2020, Retrieva, Inc. All rights reserved. 81 d1 d2 d3 d4 d5 d6 d7 d8 d9 d d d d d d d d11 d12 d13 d14 d21 d22 d23 d24 d31 d32 d33 d34 d41 d42 d43 d44 d51 d52 d53 d54 d61 d62 d63 d64 reshape+transpose(0, 2, 3, 1) dout’
  • 82. Convolution2D • Backward • dw: colT・dout’ • db: sum of columns © 2020, Retrieva, Inc. All rights reserved. 82 d1 d2 d3 d4 d5 d6 d7 d8 d9 d d d d d d d d11 d12 d13 d14 d21 d22 d23 d24 d31 d32 d33 d34 d41 d42 d43 d44 d51 d52 d53 d54 d61 d62 d63 d64 dout’
  • 83. Convolution2D • Backward • dw: colT・dout’ • db: sum of columns © 2020, Retrieva, Inc. All rights reserved. 83 d1 d2 d3 d4 d5 d6 d7 d8 d9 d d d d d d d d11 d12 d13 d14 d21 d22 d23 d24 d31 d32 d33 d34 d41 d42 d43 d44 d51 d52 d53 d54 d61 d62 d63 d64
  • 84. Convolution2D • Backward • dw: colT・dout’ • db: sum of columns • dx: same as MaxPooing2D © 2020, Retrieva, Inc. All rights reserved. 84 d1 d2 d3 d4 d5 d6 d7 d8 d9 d d d d d d d 0 3 1 6 10 4 5 2 1 5 7 1 8 4 2 3 3 2 9 4 3 6 2 8 0 3 10 4 1 5 8 4 1 6 5 2 7 1 2 3 3 2 3 6 7 2 12 5 9 4 2 8 8 1 3 8 w im2colinput
  • 85. Convolution2D • Backward © 2020, Retrieva, Inc. All rights reserved. 85
  • 86. Convolution2D • Backward © 2020, Retrieva, Inc. All rights reserved. 86
  • 87. Result • MNIST(N, 1, 28, 28) © 2020, Retrieva, Inc. All rights reserved. 87
  • 88. © 2020, Retrieva, Inc. All rights reserved. 88 Is this like Functional programming?
  • 89. Make it functional • Remove struct! © 2020, Retrieva, Inc. All rights reserved. 89
  • 90. Make it functional • Forward © 2020, Retrieva, Inc. All rights reserved. 90
  • 91. Pros and Cons • Pros • Simple(pass only as the function needs) • No protocol needed • Less memory usage • Cons • Pattern match increases • Doctest does not work with pattern match? • Huge result lists are displayed © 2020, Retrieva, Inc. All rights reserved. 91
  • 92. Pros and Cons • Pros • Simple(pass only as the function needs) • No protocol needed • Less memory usage • Cons • Pattern match increases • Doctest does not work with pattern match? • Huge result lists are displayed © 2020, Retrieva, Inc. All rights reserved. 92
  • 93. CIFAR10 • 4 Convolution + 2 Affine Network © 2020, Retrieva, Inc. All rights reserved. 93 no type config Activation parameters 1 Convolution2D 32, (3, 3), 1, 1 ReLU 896 2 Convolution2D 32, (3, 3), 1, 1 ReLU 9,248 3 MaxPooling (2, 2, 0) - 0 4 Dropout 0.25 - 0 5 Convolution2D 64, (3, 3), 1, 1 ReLU 18,496 6 Convolution2D 64, (3, 3), 1, 1 ReLU 36,928 7 MaxPooling (2, 2, 0) - 0 8 Dropout 0.25 - 0 9 Affine (4096, 512) ReLU 2,097,664 10 Dropout 0.5 - 0 4 Affine (512, 10) Softmax 5,130
  • 94. © 2020, Retrieva, Inc. All rights reserved. 94 Acceleration
  • 95. Matrex © 2020, Retrieva, Inc. All rights reserved. 95
  • 96. Matrex • Fast matrix manipulation library with CBLAS © 2020, Retrieva, Inc. All rights reserved. 96
  • 97. Matrex • Fast matrix manipulation library with CBLAS • Problem • Only for matrix • Huge cost to create Matrex struct © 2020, Retrieva, Inc. All rights reserved. 97
  • 98. NIF © 2020, Retrieva, Inc. All rights reserved. 98
  • 99. NIF • Native Implemented Functions • Enable to call C/C++ functions © 2020, Retrieva, Inc. All rights reserved. 99
  • 100. NIF • Native Implemented Functions • Enable to call C/C++ functions © 2020, Retrieva, Inc. All rights reserved. 100
  • 101. Bench • Checked by Benchfella © 2020, Retrieva, Inc. All rights reserved. 101
  • 102. Tips © 2020, Retrieva, Inc. All rights reserved. 102
  • 103. Use Float for tests • Numbers are automatically converted to chars © 2020, Retrieva, Inc. All rights reserved. 103
  • 104. Memory usage • Explicitly use processes • Avoid defstruct • Do NOT rush data • Enum.reduce consumes bigger amount of memory © 2020, Retrieva, Inc. All rights reserved. 104
  • 105. Future work © 2020, Retrieva, Inc. All rights reserved. 105
  • 106. Future work • Use OpenCL(NIF) • Implement more layers • Apply Pelemay • Apply Cockatrice © 2020, Retrieva, Inc. All rights reserved. 106
  • 107. Github • Release in a few days https://github.com/muramasa8191/broca © 2020, Retrieva, Inc. All rights reserved. 107
  • 108. Reference [1] K. Saito, “ゼロから作るDeep Learning”, O’REILLY Japan, 2016 © 2020, Retrieva, Inc. All rights reserved. 108
  • 109. © 2020, Retrieva, Inc. All rights reserved.