Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ウェブブラウザ向け深層学習モデル高速実行フレームワーク「WebDNN」
Search
Kiikurage
September 03, 2017
Programming
6
16k
ウェブブラウザ向け深層学習モデル高速実行フレームワーク「WebDNN」
2017/09/03 Deep Learning Acceleration勉強会@DeNAでの発表資料です。
Kiikurage
September 03, 2017
Tweet
Share
Other Decks in Programming
See All in Programming
nekko cloudにおけるProxmox VE利用事例
irumaru
3
430
SymfonyCon Vienna 2025: Twig, still relevant in 2025?
fabpot
3
1.2k
Mermaid x AST x 生成AI = コードとドキュメントの完全同期への道
shibuyamizuho
0
160
range over funcの使い道と非同期N+1リゾルバーの夢 / about a range over func
mackee
0
110
Итераторы в Go 1.23: зачем они нужны, как использовать, и насколько они быстрые?
lamodatech
0
830
「とりあえず動く」コードはよい、「読みやすい」コードはもっとよい / Code that 'just works' is good, but code that is 'readable' is even better.
mkmk884
3
480
情報漏洩させないための設計
kubotak
3
300
선언형 UI에서의 상태관리
l2hyunwoo
0
180
ドメインイベント増えすぎ問題
h0r15h0
2
350
PHPで学ぶプログラミングの教訓 / Lessons in Programming Learned through PHP
nrslib
3
300
Beyond ORM
77web
7
920
ブラウザ単体でmp4書き出すまで - muddy-web - 2024-12
yue4u
3
480
Featured
See All Featured
Speed Design
sergeychernyshev
25
670
Automating Front-end Workflow
addyosmani
1366
200k
Side Projects
sachag
452
42k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Six Lessons from altMBA
skipperchong
27
3.5k
Faster Mobile Websites
deanohume
305
30k
Git: the NoSQL Database
bkeepers
PRO
427
64k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
29
2k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Testing 201, or: Great Expectations
jmmastey
40
7.1k
Navigating Team Friction
lara
183
15k
Transcript
Σϒϒϥβ͚ਂֶशϞσϧߴ࣮ߦϑϨʔϜϫʔΫ WebDNN ౦ژେֶ େֶӃใཧֶܥݚڀՊ ใֶઐ߈ ݪాɾڇٱݚڀࣨ म࢜ ༔Ұ !,JJLVSBHF
༔Ұ:VJDIJSP,JLVSB ౦ژେֶ େֶӃใཧֶܥݚڀՊ ใֶઐ߈ ݪాɾڇٱݚڀࣨ म࢜ Σϒϒϥβ͚ਂֶशϞσϧߴ࣮ߦϑϨʔϜϫʔΫʮ8FC%//ʯͷ͝հ • 8FC%//ͱ
• 8FC%//ͷ͍ํ • 8FC%//͕ߦ͍ͬͯΔߴԽΞϓϩʔν ͡Ίʹ
8FC%// Σϒϒϥβ͚ਂֶशϞσϧߴ࣮ߦϑϨʔϜϫʔΫ ֶशࡁΈϞσϧΛਪϑΣʔζʹ࠷దԽ͠Σϒϒϥβ্Ͱ࣮ߦ 5IJTXPSLXBTQBSUJBMMZTVQQPSUFECZ+45 $3&45 (SBOU/VNCFS+1.+$3 +BQBO5IJTXPSLXBTBMTP QBSUJBMMZTVQQPSUFECZUIF.JOJTUSZPG&EVDBUJPO $VMUVSF 4QPSUT
4DJFODFBOE5FDIOPMPHZ .&95 BT l4FNJOBM*TTVFPO1PTU,$PNQVUFSz .BTBUPTIJ)JEBLB :VJDIJSP,JLVSB :PTIJUBLB6TIJLV 5BUTVZB)BSBEB ౦ژେֶ ใཧֶܥݚڀՊ ݪాɾڇٱݚڀࣨ .BDIJOF*OUFMMJHFODF-BC.*-
8FC%// Σϒϒϥβ͚ਂֶशϞσϧߴ࣮ߦϑϨʔϜϫʔΫ ֶशࡁΈϞσϧΛਪϑΣʔζʹ࠷దԽ͠Σϒϒϥβ্Ͱ࣮ߦ Ϟσϧఆٛ ม ࠷ ద Խ ੜ
(16#BDLFOE ֶशࡁΈ ύϥϝʔλ ύϥϝʔλ (SBQI5SBOTQJMFS ݚڀՌͷਝͳެ։ %//Λ༻͍ͨΞϓϦͷσϞ ར༻ྫ IUUQTNJMUPLZPHJUIVCJPXFCEOO %FTDSJQUPS3VOOFS $16#BDLFOE (SBQI %FTDSJQUPS
8FC%//ͷར༻ྫ .BLF(JSMT.PF <:+JOBOE+;IBOH> IUUQNBLFHJSMTNPF ("/ʹΑΔೋ࣍ݩΩϟϥը૾ੜ
ΣϒϒϥβͰͷਂֶश %//Λ࣮ΞϓϦέʔγϣϯԠ༻͢Δࡍͷ՝ αʔόʔαΠυίϯϐϡʔςΟϯά • ΫϥΠΞϯτʹର͢ΔεέʔϧΞτ͕༰қͰͳ͍ • ϓϥΠόγʔʹ৮͢ΔσʔλΛѻ͍ͮΒ͍ ΫϥΠΞϯταΠυίϯϐϡʔςΟϯά • ܭࢉڥηοτΞοϓ͕͍͠
ΣϒϒϥβͰͷਂֶश %//Λ࣮ΞϓϦέʔγϣϯԠ༻͢Δࡍͷ՝ ΣϒΞϓϦέʔγϣϯ • ΫϥΠΞϯτଆͰܭࢉ͢ΔͨΊεέʔϧΞτ͕༰қ • αʔόʔͷσʔλΞοϓϩʔυ͕ෆཁͳͨΊಗ໊ੑͷ୲อ͕༰қ • ηοτΞοϓෆཁ ΣϒαΠτʹΞΫηε͢Δ͚ͩͰར༻Մೳ
"JYJMF͞Μ !OBNBOJLV .BLF(JSTU.PFͷ࡞ऀ
ΣϒϒϥβͰͷػցֶश • .*-+4 IUUQNJMUPLZPHJUIVCJPNJMKTIUNM ݚڀࣨͰ։ൃ͍ͯ͠Δ+BWB4DSJQUϕʔεػցֶशϥΠϒϥϦ܈ • 4VTIJ +BWB4DSJQUͰಈ࡞͢ΔߦྻԋࢉϥΠϒϥϦ <,.JVSB ><.)JEBLB
> • 4VLJZBLJ 4VTIJΛܭࢉόοΫΤϯυͱ͢ΔػցֶशϥΠϒϥϦ <,.JVSB ><.)JEBLB >
8FC%//ͷಛ Σϒ࠷৽༷Λ༻͍ͨߴͳܭࢉόοΫΤϯυ 8FC(16ɾ8FC(-ɾ8FC"TTFNCMZʹΑΔ$16(16྆ํͰͷߴͳ࣮ߦ ܭࢉάϥϑ࠷దԽʹΑΔܭࢉͷߴԽ ਪϑΣʔζʹಛԽͨ͠࠷దԽʹΑΓܭࢉྔɾϞσϧύϥϝʔλαΠζΛݮ طଘͷਂֶशϑϨʔϜϫʔΫͷൣғͳαϙʔτ ,FSBT
$BGGF $IBJOFS 5FOTPS'MPXʹରԠ
8FC%//ͷಛ Σϒ࠷৽༷Λ༻͍ͨߴͳܭࢉόοΫΤϯυ • ༷ʑͳڥʹରԠՄೳͳछྨͷܭࢉόοΫΤϯυΛ࣮ • ϒϥβʹ࣮͞Ε͍ͯΔ"1*ʹԠͯࣗ͡ಈతʹ࠷దͳόοΫΤϯυΛબ • ΄΅શͯͷڥͰ(16ʹΑΔϋʔυΣΞΞΫηϥϨʔγϣϯ͕ར༻Մೳ 8FC(16
#BDLFOE 8FC(- #BDLFOE 8FC"TTFNCMZ #BDLFOE 'BMMCBDL #BDLFOE
8FC%//ͷಛ ܭࢉάϥϑ࠷దԽʹΑΔܭࢉͷߴԽ • ਪϑΣʔζʹಛԽ͢Δ͜ͱͰɺΑΓੵۃతͳܭࢉάϥϑͷ࠷దԽΛ࣮ࢪ
8FC%//ͷಛ طଘͷਂֶशϑϨʔϜϫʔΫͷൣғͳαϙʔτ • ,FSBT $BGGF $IBJOFS 5FOTPS'MPXͷֶशࡁΈϞσϧ͕มՄೳ • ಠ࣮ࣗͨؔ͠ͷରԠʢτϥϯεύΠϥͷ֦ுʣ༰қ
$IBJOFS chainer.Chain ,FSBT keras.Model $BGGF .proto 5FOTPS'MPX tf.Session
ϕϯνϚʔΫ 3FT/FU<)F > ը૾ຕͷਪʹཁ͢Δ࣌ؒ • ೖྗαΠζ • ൺֱର • ,FSBTKT
IUUQTHJUIVCDPNUSBOTDSBOJBMLFSBTKT LFSBTͷֶशࡁΈϞσϧΛ࣮ߦՄೳͳϥΠϒϥϦɻ8FC(-ʹΑΔ(16ར༻ɻ (1,224,224,3)
ϕϯνϚʔΫ 3FT/FUը૾ຕͷਪʹཁ͢Δ࣌ؒ ,FSBTKT 8FC%//
ॴཁ࣌ؒ <NTຕ> $ISPNF 'JSF'PY 4BGBSJ51 ,FSBTKT 8FC%// ॴཁ࣌ؒ<NTຕ> $ISPNF 'JSF'PY 4BGBSJ51 8FC%// 8FC%// .BD#PPL1SP&BSMZ()[*OUFM$PSFJ$16*OUFM*SJT(SBQIJDT(16 $16 (16 1$
ϕϯνϚʔΫ 3FT/FUը૾ຕͷਪʹཁ͢Δ࣌ؒ
,FSBTKT 8FC%// ॴཁ࣌ؒ <NTຕ> $ISPNF 'JSF'PY 4BGBSJ ,FSBTKT 8FC%// ॴཁ࣌ؒ <NTຕ> $ISPNF 'JSF'PY 4BGBSJ 8FC%// 8FC%// ˞ܽଛՕॴ࣮ߦෆՄೳɾαϙʔτ֎ 91&3*"9;"OESPJEY4OBQESBHPO()[Y$16"ESFOP(16 $ISPNF 'JSF'PY J1IPOFJ04"QQMF" 4BGBSJ εϚʔτϑΥϯ $16 (16
༻ํ๏ ,FSBTɾ$IBJOFSଐͷ3FT/FUֶशࡁΈϞσϧͷม IUUQTNJMUPLZPHJUIVCJPXFCEOOEPDTUVUPSJBMLFSBTIUNM IUUQTNJMUPLZPHJUIVCJPXFCEOOEPDTUVUPSJBMDIBJOFSIUNM
༻ํ๏ ֶशࡁΈϞσϧΛม͢Δ,FSBT from keras.applications import resnet50 from webdnn.frontend.keras import KerasConverter
from webdnn.backend import generate_descriptor graph = KerasConverter().convert(resnet50.ResNet50()) # (1) generate_descriptor('webgl', graph).save('model') # (2) ,FSBT keras.Model (SBQI%FTDSJQUPS GPS8FC(- #BDLFOE 8FC%//*3 1ZUIPO
༻ํ๏ ֶशࡁΈϞσϧΛม͢Δ$IBJOFS import numpy as np from chainer import Variable,
links as L model = L.ResNet50Layers() ܭࢉάϥϑΛ࡞ΔͨΊʹμϛʔσʔλΛྲྀ͢ x = Variable(np.zeros((1, 3, 224, 224), dtype=np.float32)) y = model(x, layers=['prob'])['prob'] $IBJOFS chainer.Chain (SBQI%FTDSJQUPS GPS8FC(- #BDLFOE 8FC%//*3 1ZUIPO
༻ํ๏ ֶशࡁΈϞσϧΛม͢Δ$IBJOFS from webdnn.frontend.chainer import ChainerConverter from webdnn.backend import generate_descriptor
graph = ChainerConverter().convert([x], [y]) # (1) generate_descriptor('webgl', graph).save('model') # (2) $IBJOFS chainer.Chain (SBQI%FTDSJQUPS GPS8FC(- #BDLFOE 8FC%//*3 1ZUIPO
༻ํ๏ ม݁ՌΛϒϥβ͔ΒಡΈࠐΈ࣮ߦ͢Δ let runner = await WebDNN.load('model'); let x =
runner.getInputViews()[0]; let y = runner.getOutputViews()[0]; جຊతͳલɾޙॲཧʹؔ͢ΔαϙʔτϥΠϒϥϦ͕ଐ x.set(await WebDNN.Image.getImageArray('cat.jpg', { dstW: 224, dstH: 224 })); await runner.run(); ࣮ߦ console.log(y.toActual()); JavaScript +BWB4DSJQU
ߴԽ ΣϒϒϥβίϯϐϡʔςΟϯάʹ͓͍ͯͱͳΔཁҼ +BWB4DSJQUͷΦʔόʔϔου ԋࢉίΞෆ ϝϞϦଳҬෆ
ߴԽ ΣϒϒϥβίϯϐϡʔςΟϯάʹ͓͍ͯͱͳΔཁҼ +BWB4DSJQUͷΦʔόʔϔου ԋࢉίΞෆ ϝϞϦଳҬෆ
+BWB4DSJQUͷΦʔόʔϔου • +BWB4DSJQUͦͷͷͷ࣮ߦ͕͍ • ϨΠϠΛ৮ΕΔ"1*͕૿͖͑ͯͨ • 7BOJMMB+BWB4DSJQUˠ8FC"TTFNCMZ • 8FC(-ˠ 8FC(-ˠ
8FC(16
8FC"TTFNCMZ Σϒϒϥβ͔ΒΞηϯϒϥϨϕϧͰͷ໋ྩΛѻ͑Δ༷ • +BWB4DSJQUͷΠϯλϓϦλ࣮ߦʹΑΔΦʔόʔϔου͕ͳͤ͘Δ • 7BOJMMB+BWB4DSJQUͰͰ͖ͳ͔༷ͬͨʑͳ࠷దԽ͕Մೳ • 4*.%ϚϧνεϨουՄೳʹ $ISPNF'JSF'PYͰळʙౙTIJQ͞Εͦ͏ C
C++ Rust .wasm ίϯύΠϧ ϒϥβ͔ΒόΠφϦΛ ಡΈࠐΈ࣮ߦ ϒϥβ
8FC(- • Σϒϒϥβʹ(1(16༻"1*͕ଘࡏ͠ͳ͍ • 8FC(- • ը૾ॲཧ༻"1*Ͱ͋Γ$PNQVUJOH4IBEFSαϙʔτ͞Εͯͳ͍ • ؤுΕ(1(16Ͳ͖Մೳ •
༷ʑͳ੍ͷ͍ͤͰΦʔόʔϔου͕େ͖͍ • 8FC(- • (1(16͘͢͠ͳΔػೳ͕Ճ • Φʔόʔϔου͕͔ͳΓݮΒͤΔ
8FC(16 • IUUQTXFCLJUPSHXQDPOUFOUVQMPBETXFCHQVBQJQSPQPTBMIUNM • "QQMF͕த৺ͱͳͬͯٞதͷ࣍ظ"1* • $PNQVUJOH4IBEFSΛαϙʔτɺඈ༂తͳύϑΥʔϚϯε্ • 8FC,JUʹ࣮ͨ͠ •
NBD04)JHI4JFSSBJ04ͷTBGBSJ͔Β༻Մೳ 8(ͷٞࣄΛݟ͍ͯΔͱ ʮͬͺ$PNQVUJOH4IBEFSෆཁͰʁʯ ͱ͍͏͕ٞͳ͞Ε͓ͯΓɺएׯӢߦ͖͕ո͍͠
ߴԽ ΣϒϒϥβίϯϐϡʔςΟϯάʹ͓͍ͯͱͳΔཁҼ +BWB4DSJQUͷΦʔόʔϔου ԋࢉίΞෆ ϝϞϦଳҬෆ
ϝϞϦଳҬෆͷରࡦ ,FSOFM.FSHJOH • ແବͳಡΈॻ͖ΛݮΒ͠ԋࢉີΛߴΊ • ෳͷΧʔωϧΛ̍ͭʹϚʔδ͢Δ • ൃߦͷΦʔόʔϔουݮΒͤΔ float x1
= X1[i]; float x2 = X2[i]; H[i] = x1 + x2; float h = H[i]; Y[i] = h>0?h:0; float x1 = X1[i]; float x2 = X2[i]; float h = x1 + x2; Y[i] = h>0?h:0; 3FBE 3FBE 3FBE 8SJUF 8SJUF 3FBE 3FBE 8SJUF
άϥϑߏ࠷దԽ ࣄલʹొ͞ΕͨύλʔϯʹԊͬͯάϥϑΛม $POTUBOU'PMEJOH Add Var Const1 Const2 Const1 + Const2
ύλʔϯ ม ఆ ม
άϥϑߏ࠷దԽ ࣄલʹొ͞ΕͨύλʔϯʹԊͬͯάϥϑΛม Add x1 Add x3 x2 c1 c2
άϥϑߏ࠷దԽ ࣄલʹొ͞ΕͨύλʔϯʹԊͬͯάϥϑΛม Add x1 Add x3 x2 c1 c2 $POTUBOU'PMEJOH
Add x3 x2 c1 + c2
&YQSFTTJPO4JNQMJGJDBUJPO ఆ߲Λ·ͱΊɺࣜΛ୯७Խ͠ଞͷ࠷దԽΛ༰қʹ͢Δ x1 c1 c2 Add Add x2 Add (x1
+ c1) + (x2 + c2)
&YQSFTTJPO4JNQMJGJDBUJPO ఆ߲Λ·ͱΊɺࣜΛ୯७Խ͠ଞͷ࠷దԽΛ༰қʹ͢Δ x1 x2 c2 Add Add c1 Add (x1
+ c1) + (x2 + c2) = (x1 + x2) + (c1 + c2)
&YQSFTTJPO4JNQMJGJDBUJPO ఆ߲Λ·ͱΊɺࣜΛ୯७Խ͠ଞͷ࠷దԽΛ༰қʹ͢Δ x1 x2 c2 Add Add c1 Add $POTUBOU'PMEJOH
&YQSFTTJPO4JNQMJGJDBUJPO ఆ߲Λ·ͱΊɺࣜΛ୯७Խ͠ଞͷ࠷దԽΛ༰қʹ͢Δ x1 Add Add c1 + c2 x2
/PSNBMJ[BUJPO &YQSFTTJPO4JNQMJGJDBUJPO ఆ߲Λ·ͱΊɺࣜΛ୯७Խ͠ଞͷ࠷దԽΛ༰қʹ͢Δ x1 w Conv2D x2 s Mul x3
b Add
&YQSFTTJPO4JNQMJGJDBUJPO ఆ߲Λ·ͱΊɺࣜΛ୯७Խ͠ଞͷ࠷దԽΛ༰қʹ͢Δ x1 w Conv2D x2 s Mul x3 b
Add &YQSFTTJPO4JNQMJGJDBUJPO
&YQSFTTJPO4JNQMJGJDBUJPO ఆ߲Λ·ͱΊɺࣜΛ୯७Խ͠ଞͷ࠷దԽΛ༰қʹ͢Δ x1 Conv2D x3 b Add x4 s Mul
w
&YQSFTTJPO4JNQMJGJDBUJPO ఆ߲Λ·ͱΊɺࣜΛ୯७Խ͠ଞͷ࠷దԽΛ༰қʹ͢Δ x1 Conv2D x3 b Add x4 s Mul
w $POTUBOU'PMEJOH
&YQSFTTJPO4JNQMJGJDBUJPO ఆ߲Λ·ͱΊɺࣜΛ୯७Խ͠ଞͷ࠷దԽΛ༰қʹ͢Δ x1 Conv2D x3 b Add w * s
,FSOFM.FSHJOH &MFNFOUXJTFͳΧʔωϧΛ̍ͭʹ·ͱΊɺϝϞϦͷॻ͖ࠐΈ ΧʔωϧͷσΟεύονʹΑΔΦʔόʔϔουΛݮΒ͢ Conv2D x2 Add Mul Add x3 x4
x9 Conv2D x6 Mul Add x7 x8 x10 Relu s1 b1 b2 s2 x1 w1 x5 w2
,FSOFM.FSHJOH &MFNFOUXJTFͳΧʔωϧΛ̍ͭʹ·ͱΊɺϝϞϦͷॻ͖ࠐΈ ΧʔωϧͷσΟεύονʹΑΔΦʔόʔϔουΛݮΒ͢ Conv2D x2 Add Mul Add x3 x4
x9 Conv2D x6 Mul Add x7 x8 x10 Relu s1 b1 b2 s2 x1 w1 x5 w2 &MFNFOUXJTF
&MFNFOUXJTF ,FSOFM.FSHJOH &MFNFOUXJTFͳΧʔωϧΛ̍ͭʹ·ͱΊɺϝϞϦͷॻ͖ࠐΈ ΧʔωϧͷσΟεύονʹΑΔΦʔόʔϔουΛݮΒ͢ Conv2D x2 Add Mul Add x3
x4 x9 Conv2D x6 Mul Add x7 x8 x10 Relu s1 b1 b2 s2 x1 w1 x5 w2 ճ 3FBEɾ8SJUF
&YQSFTTJPO4JNQMJGJDBUJPO ,FSOFM.FSHJOH &MFNFOUXJTFͳΧʔωϧΛ̍ͭʹ·ͱΊɺϝϞϦͷॻ͖ࠐΈ ΧʔωϧͷσΟεύονʹΑΔΦʔόʔϔουΛݮΒ͢ Conv2D x2 Add Mul Add x3
x4 x9 Conv2D x6 Mul Add x7 x8 x10 Relu s1 b1 b2 s2 x1 w1 x5 w2 &YQSFTTJPO4JNQMJGJDBUJPO
,FSOFM.FSHJOH &MFNFOUXJTFͳΧʔωϧΛ̍ͭʹ·ͱΊɺϝϞϦͷॻ͖ࠐΈ ΧʔωϧͷσΟεύονʹΑΔΦʔόʔϔουΛݮΒ͢ Conv2D Add Add x3 x4 x9 Conv2D
Add x7 x8 x10 Relu b1 b2 x1 w1 * s1 x5 w2 * s2
&YQSFTTJPO4JNQMJGJDBUJPO ,FSOFM.FSHJOH &MFNFOUXJTFͳΧʔωϧΛ̍ͭʹ·ͱΊɺϝϞϦͷॻ͖ࠐΈ ΧʔωϧͷσΟεύονʹΑΔΦʔόʔϔουΛݮΒ͢ Conv2D Add Add x3 x4 x9
Conv2D Add x7 x8 x10 Relu b1 b2 x1 w1 * s1 x5 w2 * s2
$POTUBOU'PMEJOH ,FSOFM.FSHJOH &MFNFOUXJTFͳΧʔωϧΛ̍ͭʹ·ͱΊɺϝϞϦͷॻ͖ࠐΈ ΧʔωϧͷσΟεύονʹΑΔΦʔόʔϔουΛݮΒ͢ Conv2D Add Add x3 x4 x9
Conv2D Add x8 x10 Relu b2 x1 w1 * s1 x5 w2 * s2 x7 b1
,FSOFM.FSHJOH &MFNFOUXJTFͳΧʔωϧΛ̍ͭʹ·ͱΊɺϝϞϦͷॻ͖ࠐΈ ΧʔωϧͷσΟεύονʹΑΔΦʔόʔϔουΛݮΒ͢ Conv2D Add Add x3 x4 x9 Conv2D
x10 Relu x1 w1 * s1 x5 w2 * s2 x7 b1 + b2
,FSOFM.FSHJOH &MFNFOUXJTFͳΧʔωϧΛ̍ͭʹ·ͱΊɺϝϞϦͷॻ͖ࠐΈ ΧʔωϧͷσΟεύονʹΑΔΦʔόʔϔουΛݮΒ͢ Conv2D Add Add x3 x4 x9 Conv2D
x10 Relu x1 w1 * s1 x5 w2 * s2 x7 b1 + b2 &MFNFOUXJTF,FSOFM.FSHJOH
,FSOFM.FSHJOH &MFNFOUXJTFͳΧʔωϧΛ̍ͭʹ·ͱΊɺϝϞϦͷॻ͖ࠐΈ ΧʔωϧͷσΟεύονʹΑΔΦʔόʔϔουΛݮΒ͢ Conv2D MergedElementwise x3 Conv2D x10 x1 w1
* s1 x5 w2 * s2 x7 b1 + b2 ճ ˠճ 3FBEɾ8SJUF
,FSOFM.FSHJOH ,FSOFM.FSHJOHʹΑΔ࠷దԽͷޮՌ 4BGBSJ51.BD#PPL1SP&BSMZ 3FT/FU࣮ߦ࣌ؒ <NTJNBHF> WebGPU backend 最適化なし WebGPU
backend ,FSOFM.FSHJOH
ϝϞϦଳҬෆͷରࡦ %BUB'PSNBU0QUJNJ[BUJPO ܭࢉάϥϑதͷมΛɺϝϞϦ্ʹͲͷΑ͏ʹ֨ೲ͢Δ͔Λ࠷దԽ • %BUB0SEFS 0QFSBUPSͷछྨɾೖग़ྗมͷܗঢ়ͳͲʹΑΓదͨ͠σʔλΦʔμʔҟͳ Δ • ͋Δ0QFSBUPS/)8$Ͱɺผͷ0QFSBUPS/$)8ͰσʔλΛѻ͍͍ͨɺ ͱ͍ͬͨ͜ͱ͕͋Δ
• લޙͷ0QFSBUPSՃຯͯ͠ೖग़ྗมͷ%BUB 0SEFSΛܾΊΔ
ϝϞϦଳҬෆͷରࡦ %BUB'PSNBU0QUJNJ[BUJPO ܭࢉάϥϑதͷมΛɺϝϞϦ্ʹͲͷΑ͏ʹ֨ೲ͢Δ͔Λ࠷దԽ • "MJHONFOUBOE1BEEJOH 4*.%໋ྩ(16ΧʔωϧதͰͷॲཧൣғͷׂׂΓͯʢ5JMJOHʣΛ༰қʹ ͢ΔͨΊʹߦྻͷαΠζɾΦϑηοτΛἧ͑Δ
ϝϞϦଳҬෆͷରࡦ ྫ (&..$"# ߦྻͷαΠζ͕λΠϧαΠζͰ ៉ྷʹׂΓΕΔΑ͏ ༧ΊύσΟϯά͓ͯ͘͠ " # $ 5JMF
ϝϞϦଳҬෆͷରࡦ ྫ (&..$"# ߦྻͷαΠζ͕λΠϧαΠζͰ ៉ྷʹׂΓΕΔΑ͏ ༧ΊύσΟϯά͓ͯ͘͠ " 1BEEJOH # $
%BUB'PSNBU 0QUJNJ[BUJPO %BUB'PSNBU 0QUJNJ[BUJPOʹΑΔ࠷దԽͷޮՌ 4BGBSJ51.BD#PPL1SP&BSMZ 3FT/FU࣮ߦ࣌ؒ <NTJNBHF> WebGPU backend 最適化なし
WebGPU backend + Elementwise Kernel Merging WebGPU backend + Elementwise Kernel Merging %BUB'PSNBU 0QUJNJ[BUJPO
·ͱΊ 8FC%//Σϒϒϥβ͚ਂֶशϞσϧߴ࣮ߦϑϨʔϜϫʔΫ IUUQTNJMUPLZPHJUIVCJPXFCEOO Σϒ࠷৽༷Λ༻͍ͨߴͳܭࢉόοΫΤϯυ 8FC(16ɾ8FC(-ɾ8FC"TTFNCMZʹΑΔ$16(16྆ํͰͷߴͳ࣮ߦ ܭࢉάϥϑ࠷దԽʹΑΔܭࢉͷߴԽ ਪϑΣʔζʹಛԽͨ͠࠷దԽʹΑΓܭࢉྔɾϞσϧύϥϝʔλαΠζΛݮ
طଘͷਂֶशϑϨʔϜϫʔΫͷൣғͳαϙʔτ ,FSBT $BGGF $IBJOFS 5FOTPS'MPXʹରԠ