Upgrade to Pro — share decks privately, control downloads, hide ads and more …

RubyでChainerつくってます!!

hatappi
March 30, 2019

 RubyでChainerつくってます!!

Chainer Meetup #09
#chug_jp

hatappi

March 30, 2019
Tweet

More Decks by hatappi

Other Decks in Technology

Transcript

  1. 2 • Yusaku Hatanaka • Merpay Inc. • Backend Engineer

    • GoΛॻ͍͍ͯΔ͜ͱ͕ଟ͍ • ϓϥΠϕʔτ • RubyΛॻ͍͍ͯΔ͜ͱ͕ଟ͍ • Anket: RailsΛ࢖ͬͨSlackͷΞϯέʔταʔϏε • Red Chainer: ʁʁʁʁ
 ↑ࠓ೔͸͜ͷ࿩Λ͠·͢
 self introduction @hatappi
  2. 7 ✓ Activation
 Relu, Sigmoid, LeakyReLU, LogSoftmax, Tanh ✓ loss


    SoftMaxEntropy, MeanSquaredError ✓ noise
 Dropout ✓ Normalization
 BatchNormalization ✓ Pooling
 AveragePooling2D, MaxPooling2D ✓ etc
 Chainerͷఏڙ͢ΔVariable΍TrainerͳͲ ͷ֤छAPIΛ༻ҙ͍ͯ͠·͢ ݱঢ়Կ͕Ͱ͖Δͷ͔ ֤छAPIͷఏڙ αϯϓϧ ✓ MNIST ✓ CIFAR 10, 100 ✓ Iris
  3. 10 Red Data Tools • Ruby⽤のデータ処理ツールを提供するプロジェクト • 2017年2⽉に発⾜ • 活動例

    • Apache Arrow本体への開発の参加やRubyのbinding • Charty, Red Datasets, Red Chainer, etc • 毎⽉1回のオフラインMeetupをやっている • 次回は4/9!! • https://speee.connpass.com/event/124079/ https://red-data-tools.github.io/ja/
  4. 11 Red Data Tools Policy 1. Collaborate across the Ruby

    community 2. Acting rather than blaming 3. Continuous, iterative progress rather than a short, big project 4. The current lack of knowledge doesn't matter 5. Ignore criticism from outsiders 6. Fun!
  5. 19 First Commit • Chainer v2ͷίʔυΛͻͨ͢ΒಡΉ • Python΄ͱΜͲॻ͍ͨ͜ͱͳ͍ͷͰPythonͷυΩϡϝϯτಡ Έͳ͕Βͻͨ͢ΒϙʔςΟϯά •

    ྫ͑͹࠷ॳ͸ˣ͕ͲΜͳڍಈʹͳΔ͔෼͔ΒͣυΩϡϝϯτ ΛಡΉͳͲ͢ΔͨΊ͕͔͔࣌ؒΔ • ͳΕͯ͘Δͱ಄ͷதͰม׵Ͱ͖ΔΑ͏ʹͳΔ
  6. 24

  7. 27 ৞ΈࠐΈԋࢉͷαϙʔτ • ը૾ࣝผ͍ͨ͠ʂʂʂ • BatchNormalization, Pooling, etc.. ͳͲͷAPIΛ௥Ճ •

    CIFAR-10, 100ͷαϯϓϧͷ௥Ճ • Ϟσϧ͸VGG, ResNet18 • ՄࢹԽͨ͘͠ͳΔ • ྫ͑͹ը૾ࣝผΛRed ChainerͰߦͬͯepoch͝ͱͷਫ਼౓ΛՄ ࢹԽ͍ͨ͠
  8. 32 Chainer 3ܥ΁ͷରԠ • Chainer3ܥͰऔΓࠐ·ΕͨPRΛͬ͟ͱݟͯͲΜ ͳରԠ͕ඞཁ͔Λ೺Ѳ͢Δ • ChainerͷGithub releasesݟ΍ͯ͘͢ॿ͔Γ ·ͨ͠

    • 1೔1࣌ؒ͘Β͍͔͕࣌ؒ͠ͱΕͳ͍ͷͰ Trello Ͱ؅ཧͭͭ͠๨Εͳ͍Α͏ʹ͠ͳ͕Βਐḿͤ͞ Δ
  9. 34 ͿͬͪΌ͚࢖͑Δͷʁ MNIST (epoch: 20, unit: 1000, batchsize: 100) શepochʹ͔͔ͬͨඵ਺

    0 2000 4000 6000 8000 Numo::NArray Numo::NArray with OpenBLAS numpy 408.025 s 784.824 s 7415.42 s
  10. 36 ࠓޙʹ͍ͭͯ • 4ܥରԠ΋͍͖ͯ͠·͢$ • ONNX͕࢖͑ΔΑ͏ʹͳΓ͍ͨ <= ࠓணख͠͸͡Ίͯ·͢ • ONNX

    • open neural network exchange format • ྫ͑͹ChainerͰֶशͨ͠ϞσϧΛMXNetͰऔΓࠐΜͰ࢖ ͏͜ͱ͕ग़དྷΔ • Red ChainerͰ΋࢖͑ΔΑ͏ʹͳΕ͹طଘͷࢿ࢈Λ࢖͏͜ͱ ͕Ͱ͖ΔͷͰخ͍͠͸ͣ