23. Artificial Neuron (AN)
+
x0=1
x1
x2
xN
... w0 (Bias)
w1
w2
wN
f(u)
u y
xi: Input signal
wi: Weight
u: Internal state
f(u): Activation function
(Sigmoid, ReLU, etc.)
y: Output signal
y f (u)
u wi xi
i0
N
23
25. LeNet-5
• CNNのベース (1980年に福島先⽣がネオコグニトロ
ンをすでに発表済み!!)
• 畳込み(特徴抽出)→フル結合(分類)
• 5層
Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to
document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. 25
36. 2値化/3値化 on FPGAがトレンド
• FPT2016 (12⽉開催)
• E. Nurvitadhi (Intel) et al., “Accelerating Binarized Neural
Networks: Comparison of FPGA, CPU, GPU, and ASIC”
• H. Nakahara, “A Memory-Based Realization of a Binarized Deep
Convolutional Neural Network”
• ISFPGA2017 (先週開催)
• Ritchie Zhao et al., “Accelerating Binarized Convolutional Neural
Networks with Software-Programmable FPGAs”
• Y. Umuroglu (Xilinx) et al., FINN: A Framework for Fast,
Scalable Binarized Neural Network Inference
• H. Nakahara, H. Yonekawa, “A Batch Normalization Free
Binarized Convolutional Deep Neural Network on an FPGA”
• Y. Li et al., “A 7.663-TOPS 8.2-W Energy-efficient FPGA
Accelerator for Binary Convolutional Neural Networks,”
• G. Lemieux, “TinBiNN: Tiny Binarized Neural Network Overlay
in Less Than 5,000 4-LUTs,”
36
42. 内蔵メモリの活⽤
• 広帯域なメモリを実現
• 外部I/Oを介さないため, 低消費電⼒
42
v
v
v
v
v
v
+
B. Weight
Mem.
Int. Bias
Mem.
Write
Ctrl.
Logic
Counter
Binarized
MACs
Sign
2L+K bits Shift Register
v
v
Ni F. maps
Ni+1 F. maps
Read Ni bits
Update Ni+1 bits
On chip memory realization
48. Conventional Design Flow
for the Programmable SoC
48
①
②
④
③
1. Behavior design
2. Profile analysis
3. IP core generation by HLS
4. Bitstream generation by
FPGA CAD tool
5. Middle ware generation
49. Modern System Design
49
①
②
④
③
1. Behavior design
+ pragmas
2. Profile analysis
3. IP core generation by HLS
4. Bitstream generation by
FPGA CAD tool
5. Middle ware generation
↓
Automatically done
50. Deep Convolutional
Neural NetworkのHLS実装
• 依存性のない7重ループの最適化
→⾼位合成でも最適化しやすい
...
...
120 nodes
10 nodes
16 F. maps
5x5
16 F. maps
10x10
6 F. maps
14x14
6 Feature maps
28x28
Gray scale
image
32x32
5x5
2x2
5x5
2x2 5x5
1 2 1
2 4 2
1 2 1
①
②
③
④
⑤
⑥
⑦
50