Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
ニューラルネットの1bit化 / 1bit-neural-network
Search
shun74
July 13, 2022
Programming
1.1k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ニューラルネットの1bit化 / 1bit-neural-network
Explanation of what is 1bit neural network .
shun74
July 13, 2022
Transcript
9 slides
ニューラルネットの1bit化 B4 shun sato
本日のお話 • ニューラルネットとは • ニューラルネットの1bit化 • 1bit化のメリット • FPGAによる爆速化
ニューラルネットとは • 人間のシナプス結合を模倣 • 掛け算足し算をたくさんやる • 出力と答えの誤差を微分して学習 ニューラルネット内の数値表現 • 入力
:float32, int32, uint8… • 重み :float32 • バイアス :float32 • 出力・答え :float32, int32, uint8… シナプス結合 ニューラルネット(多層パーセプトロン)
ニューラルネットの1bit化 内部の表現をいろいろと1bit化する 式: ⇢⇢⇢ 1bit化 重み・活性化関数・正則化などが1bit化可能 ※ここでいう1bitとは{-1, 1}のことです
1bit化のメリット • メモリ大幅削減! float32 ⇢ 1bitでメモリ消費が1/32になる • 計算の単純化 ⇢ 高速化・省電力
• FPGAによる爆速化 (次のスライド) 1bitの掛け算はXNORと同じ ⇢ ALUを使わなくても計算可能 足し算もbit countで高速に処理
FPGAによる爆速化 FPGA = Field Programmable Gate Array (その場で書き換え可能な集積論理回路) ⇠こういうやつ 高位合成でプログラムするのが一般的
HDLでもプログラム可能 LUT(Look up table)を使った高速な計算が可能 浮動小数点演算 :速くて40クロックぐらい LUT+FFによる演算 :数クロック LUTで数値を取り出してFFに入力
FPGAの実験 ⇠ FPGAのみの実験結果 ネットワークの大きさはSFC<LFC<CNVの順番 手元でSFCをGPUで動かしたら9500FPSぐらいだった 1bit+FPGAにすれば約1000倍速(1200万FPS)になる? LUTは回路の面積も小さいので省電力
デメリットもあるよね? • 普通に1bit化すると大幅な精度低下 • ニューラルネットの1bit化について様々な研究が存在 • Binary Connect:BC (CVPR 2015)
https://arxiv.org/abs/1511.00363 NNの重みを1bit化した初のモデル • Binarized Neural Network:BNN (NIPS 2016) https://arxiv.org/abs/1602.02830 BCの活性化関数を1bit化 計算のボトルネックになるBatchNormalizationをシフト演算化 • XNOR-Net (CVPR 2016) https://arxiv.org/abs/1603.05279 BNNの演算に係数をつけて大規模データセットにも対応 畳み込みブロックの順序を変えて精度を向上
参考文献 • ニューラルネット https://sinhrks.hatenablog.com/entry/2014/11/30/192940 • 1bit化とハードウェア https://www.slideshare.net/kentotajiri/ss-77136469 • 演算のクロック数 http://rakasaka.fc2web.com/delphi/numop.html
• FPGAの大手企業 Xilinx https://xilinx.com/
More Decks by shun74
See All by shun74
深度推定モデルの自己教師あり学習/self-supervised-depth
shun74
0
590
GPUでステレオマッチング / Stereo-matching with GPU
shun74
0
1.3k
卒業研究の進め方 / How to preceed with the research
shun74
1
670
Barcode Recognition / pharmacode-decoder
shun74
0
1.2k
Vision Transformer講座 / Vision Transformer Presentation
shun74
1
870
Defocus Map Estimation From a Single Image Based on Two-Parameter Defocus Model / two-parameter-defocus-model
shun74
0
440
理解してほしいVision Transformer / plz-understand-ViT
shun74
0
880
Other Decks in Programming
See All in Programming
Snowflake Openflow Connector利用の勘所 / 20261024developersio2026tokyo-snowflake-openflow
kasacchiful
PRO
0
360
Python Lambdaにおけるテストしやすい設計とAI支援の活用 / Designing Testable Python Lambda Functions with AI
kitano_yuichi
1
340
Beyond Chatbots: Agentic UI with Open Standards @W-JAX 2026, München
manfredsteyer
PRO
0
120
AI Augmentation Techniques with Liberty
ivargrimstad
1
530
DroidKnights 2026 Android A2UI Jetpack Compose 기반의 안전한 AI UI 렌더링 - 박제창
itsmedreamwalker
1
250
Materialが消えた日 〜真っ白なFlutterキャンバスにRenderObjectで絵を描く〜
umigishiaoi
0
170
Spec-Driven Development - Why Vaadin Is the Perfect Fit
simas
PRO
0
260
GraphQL の onError と Nullability のこれから
quramy
0
220
SFCで実現する病院・医療システムの動的組み立て式UI
koukimiura
1
180
私なりのハーネスエンジニアリング ~独自の言語処理系の開発を通して~
seosoft
0
220
baseline으로 마이그레이션, 리팩토링 안전하게 맡기기
fornewid
1
1k
AWS CDKを理解するために公式の定義を深掘って解説してみる / Understanding AWS CDK by Digging into Its Official Definition
akihisaikeda
3
320
Featured
See All Featured
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.3k
The SEO Collaboration Effect
kristinabergwall1
1
620
How to Think Like a Performance Engineer
csswizardry
28
2.9k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
480
What the history of the web can teach us about the future of AI
inesmontani
PRO
3
820
Done Done
chrislema
187
17k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
610
The Cost Of JavaScript in 2023
addyosmani
56
10k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
630
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k