実践 PyTorch Lightning (2019/11/30 分析コンペLT会 #1)

F48d3107f5e7a4c6f765752df9754e6b?s=47 fam_taro
November 30, 2019

実践 PyTorch Lightning (2019/11/30 分析コンペLT会 #1)

2019/11/30 分析コンペLT会 #1 で LT させていただいたスライドです。
https://kaggle-friends.connpass.com/event/154881/

F48d3107f5e7a4c6f765752df9754e6b?s=128

fam_taro

November 30, 2019
Tweet

Transcript

  1. 2.

    ࣗݾ঺հ – ໊લ౻ຊ༟հ 5XJUUFS!GBN@UBSP – ུྺ – ૣҴాେֶେֶӃम࢜՝ఔमྃ  ࣗવݴޠॲཧ

    –  4*FS ۚ༥ܥ –  ೿ݣձࣾ 42- –  /PX-1*9&- – ۦ͚ग़͠ ,BHHMF.BTUFS – ઌʑि  ͳΓ·ͨ͠ʂ 
  2. 3.

    ࠷ۙͷίϯϖྺ ࣌ظ ,BHHMFίϯϖ ੒੷ ίϝϯτ ݄ 4**."$31OFVNPUIPSBY 4FHNFOUBUJPO ؾڳίϯϖ 5PQ

     ॳ(PME ɻͨͩ͠ 1Z5PSDIʹΑΔେ͖ͳෛͷҨ࢈Λ ࡞ͬͯ͠·ͬͨ ݄ 4FWFSTUBM4UFFM%FGFDU %FUFDUJPO మίϯϖ 5PQ  1Z5PSDI-JHIUOJOHσϏϡʔ രࢮ ݄ 34/"*OUSBDSBOJBM )FNPSSIBHF%FUFDUJPO ೴ίϯϖ 5PQ  Θʔ͍ʂʢ!"QQJBO͞ΜͷίʔυΛؙύΫϦͯࣗ͠ ෼Ͱॻ͜͏ͱ͠ͳ͔ͬͨʣ ݄ 6OEFSTUBOEJOH$MPVETGSPN 4BUFMMJUF*NBHFT Ӣίϯϖ 5PQ  1Z5PSDI-JHIUOJOHϦϕϯδ ͳΜͱ͔ 4PMP4JMWFS
  3. 5.

    ஫ҙࣄ߲ • 1Z5PSDIͷ࢖༻͕લఏͱͳ͍ͬͯ·͢ • ࢖͍ͬͯͳ͍ਓ͝ΊΜͳ͍͞ʢศར͔ͩΒ͓͢͢ΊͰ͢Αʣ • ͔ͭ͋Δఔ౓࢖ͬͨਓ͕ϝΠϯλʔήοτͰ͢ • ͱ͜ΖͲ͜ΖςΫχΧϧͳ୯ޠ͕͋Δ͔΋͠Ε·ͤΜ •

    ύοτݟΑ͘෼͔Βͳ͔ͬͨΒ͍ͭͰ΋ฉ͍͍ͯͩ͘͞ • ࠓճͷίʔυ Ӣίϯϖ༻ ͸Լهʹஔ͍ͯ͋Γ·͢ • IUUQTHJUIVCDPNZVLLZP,BHHMF6OEFSTUBOEJOH$MPVETUITPMVUJPO • ͜ͷ -5Ͱ͸ QZUPSDIMJHIUOJOHΛ૝ఆ͍ͯ͠·͢ • ͢Ͱʹ࠷৽൛͸ Ͱ͢͝ΊΜͳ͍͞
  4. 10.

    Ԛ͘ͳͬͨཁҼ • ࣗ෼Ͱॻ͘ USBJO@B@FQPDI • ແݶʹਂ͘ͳΔ GPSϧʔϓʢFQPDI CBUDI FUDʜ •

    ແݶʹ૿͑ΔҾ਺ • ࣗ෼Ͱ΍Δ MFBSOJOH@SBUF@TDIFEVMFSTUFQ • ࣗ෼Ͱΰχϣΰχϣͯ͠͠·͏ (SBEJFOU"DDVNVMBUJPO • (SBEJFOU"DDVNVMBUJPO ޯ഑ྦྷੵ ɿύϥϝʔλߋ৽ PQUJNJ[FSTUFQ Λ਺όονʹճʹ͢Δ͜ͱͰ #4Λ૿΍͢͜ͱʹ͍ۙॲཧΛ͢Δ • #4େ͖͘͢Δ͜ͱͱ׬શʹ౳ՁͰ͸ͳ͍ͷͰ஫ҙ • ࣗ෼Ͱΰχϣΰχϣ͢Δ UREN • FUDʜ
  5. 11.

    Ԛ͘ͳͬͨཁҼ • ࣗ෼Ͱॻ͘ USBJO@B@FQPDI • ແݶʹਂ͘ͳΔ GPSϧʔϓʢFQPDI CBUDI FUDʜ •

    ແݶʹ૿͑ΔҾ਺ • ࣗ෼Ͱ΍Δ MFBSOJOH@SBUF@TDIFEVMFSTUFQ • ࣗ෼Ͱΰχϣΰχϣͯ͠͠·͏ (SBEJFOU"DDVNVMBUJPO • (SBEJFOU"DDVNVMBUJPO ޯ഑ྦྷੵ ɿύϥϝʔλߋ৽ PQUJNJ[FSTUFQ Λ਺όονʹճʹ͢Δ͜ͱͰ #4Λ૿΍͢͜ͱʹ͍ۙॲཧΛ͢Δ • #4େ͖͘͢Δ͜ͱͱ׬શʹ౳ՁͰ͸ͳ͍ͷͰ஫ҙ • ࣗ෼Ͱΰχϣΰχϣ͢Δ UREN • FUDʜ ͲΕ΋ίϯϖͰઓ͏্Ͱ͸ ຊ࣭తͰ͸ͳ͍
  6. 12.

    ΦϨΦϨ 5SBJOFSΫϥε΋ॻ͚Δ͚Ͳʜ • ઈରԚ͘ͳΔ • 8JOOFSTPMVUJPODPEFͰΑ͘ݟ͔͚Δ͚ͲେମԚ͍ • Ճ͑ͯඍົʹͦΕͧΕݸੑग़͖ͯͯ͠ਏ͍ • ͦͷ͏ͪؾ͔ͮͣʹόάຒΊࠐΈͦ͏

    • Ͱ͖Ε͹ͪΌΜͱͨ͠ઃܭʹԊ͍͍ͨ • ଞਓ ະདྷͷࣗ෼ؚΊ ͕Ҡ২͢Δͱ͖ʹָʹҠ২Ͱ͖ͯ΄͍͠ • ࣗ෼Ͱϝϯς͢ΔؾʹͳΕͳ͍ • ઈରਏ͍ • ͋ʔͲ͔͜ʹ๻ΑΓڧͦ͏ͳͻͱ͕ϝϯςͯ͘͠ΕΔ 5SBJOFS Ͷʔ͔ͳʔʁʁʁ
  7. 16.

    1Z5PSDI-JHIUOJOHͱ͸ େ͖͘ҎԼ ͭͷཁૉ͕͋Δ • -JHIUOJOH.PEVMF • 㲈 .PEFM %BUBTFU -PTT

    0QUJNJ[FS • USBJOJOH΍ WBMJEBUJPOͷ֤ TUFQͷಈ࡞ͳͲΛఆٛ • WBMJEBUJPOFOE࣌ʹ݁ՌΛͲ͏ू໿͢Δ͔ͱ͔΋ఆٛՄ • 5SBJOFS • %FWJDF (16PS$16 ΍ .JYFE1SFDJTJPO • .VMUJ(165ZQF %1PS%%1  • 8FJHIU΍ MPHͷอଘ৔ॴ • $BMMCBDL FBSMZTUPQQJOHͱ͔ • (SBEJFOU"DDVNVMBUJPO
  8. 17.

    4UBSU1Z5PSDI-JHIUOJOH • 4UFQQJQJOTUBMMQZUPSDIMJHIUOJOH • 4UFQ ඞཁͳਓ͸ OWJEJBBQFYΛผ్Πϯετʔϧ • 1Z5PSDI-JHIUOJOHΛ࢖͏͚ͩͳΒඞਢͰ͸ͳ͍ •

    Ͱ΋ศརͳͷͰݸਓతʹ͸ਪ঑ • 4UFQ-JHIUOJOH.PEVMFͷ࡞੒ • 4UFQ5SBJOFSͷ࡞੒ • 4UFQUSBJOFSGJU NZ@MJHIUOJOH@NPEVMF
  9. 18.

    4UFQ-JHIUOJOH.PEVMFͷ࡞੒ • -JHIUOJOH.PEVMF Λܧঝ • ҎԼͷؔ਺Λఆٛ • ඞਢ 3FRVJSFE •

    USBJOJOH@TUFQ • DPOGJHVSF@PQUJNJ[FST • 999@EBUBMPBEFS • ࣗ༝ 0QUJPOBM • WBMJEBUJPO@TUFQ • WBMJEBUJPO@FOE
  10. 23.

    1Z5PSDI-JHIUOJOHͷ஫ҙ఺ • ·ͩ 4UBCMFͳόʔδϣϯͰ͸ͳ͍ • ޙํޓ׵ੑͳΜͯ؁͑͸ͳ͍ όʔδϣϯΞοϓ ॻ͖௚͠ඞਢ • 1Z$IBSNͱ͔ͷؔ਺δϟϯϓػೳ͸ඞਢʢ1Z5PSDIॳͷਓʹ͸ඇਪ঑ʣ

    • .VMUJ(16º .JYFE1SFDJTJPO5SBJOJOH ͷબ୒ࢶ͕ %%1ͷΈ • 1Z5PSDIͰ .VMUJ(16Λ࢖͏ͨΊͷબ୒ࢶ͸ %1ͱ %%1 • %1 %BUB1BSBMMFM • Πϝʔδ֤(16Λ߹ମͯ͠େ͖͍(16Λ࡞Δ • %%1 %JTUSJCVUFE%BUB1BSBMMFM • Πϝʔδ֤(16Ͱಠཱͯ͠ॲཧΛਐΊΔײ͡ • %BUBTFUΛ(16ຖʹ෼ׂ͢Δ • %1ͱ %%1ͷࠩ͸Լه͕Ұ൪෼͔Γ΍͍͢ • IUUQXXXUFMFTFOTDPEJTUSJCVUFEEBUBQBSBMMFMUSBJOJOH VTJOHQZUPSDIPOBXT
  11. 24.

    1Z5PSDI-JHIUOJOHͷ஫ҙ఺ • %%1࣌ʹ 7BMJE%BUB-PBEFSΛ෼ׂ͢Δͱ 7BMJE4DPSF͕ਖ਼ ͘͠ܭࢉͰ͖ͳ͍ Ұ෦͔͠࢖ΘΕͳ͍ • ݱঢ়෼ׂ͢Δͱ (16ͷ

    7BMJE4DPSF͔͠อଘ͞Εͳ͍ • ֤ (16Ͱܭࢉͨ͠ 7BMJE4DPSFΛू໿ SFEVDF Ͱ͖ͳ͍ • IUUQTHJUIVCDPNXJMMJBN'BMDPOQZUPSDIMJHIUOJOHJTTVFT • ͪΌΜͱ 7BMJE4DPSFΛܭࢉ͢ΔͨΊʹ͸ 7BMJE%BUB-PBEFSΛ෼ ׂͤͣʹ֤ (16Ͱܭࢉͤ͞Δ ༨෼ͳܭࢉΛ͠ͳ͍ͱ͍͚ͳ͍ • গ͚͕͔͔ͩ࣌ؒ͠Δ • ͋͘·Ͱ 7BMJEͳͷͰ 5SBJO࣌ؒʹൺ΂Ε͹ڐͤΔ͕
  12. 26.

    ࢖ͬͯΈͨײ૝ • ·ͩ·ͩൃల్্͚ͩͲظ଴େ • ݸਓతʹ͸ 1Z5PSDI*HOJUFΑΓ͸޷͖ • ΄ͲΑࣗ͘༝౓ͷ࢒ͬͨςϯϓϨʔτͰ͋Γɺڧ੍తʹ৑௕ͳ ϧʔϓΛ෼ׂ͢ΔΑ͏ʹͳΔͷͰݸਓతʹ͸خ͍͠ •

    ඞͣॻؔ͘਺͕ܾ·͍ͬͯΔͷͰɺଞλεΫ࢝ΊΔͱ͖΋࢝Ί΍͍͢ • ࠓ࢖͍࢝ΊΔͱ౓ʑؔ਺δϟϯϓΛ࢖Θ͟ΔΛ͑ͳ͍͚Ͳɺ ιʔείʔυΛಡΉ͜ͱͰ৭ʑษڧʹͳͬͨ • %JTUSJCVUFE%BUB4BNQMFSͱ͔
  13. 27.

    ݁࿦ • .VMUJ(16पΓͷڍಈΛআ͚͹͍͍ͩͨຬ଍ʂ • 4JOHMF(16ͳΒؾʹͳΔͱ͜Ζ͸ͳ͍ • ,BHHMFͰ͸ 1Z5PSDI$BUBMZTU΋ྲྀߦͦ͠͏ͳͷͰཁνΣοΫ • $BUBMZTU͸

    4FHNFOUBUJPOUVUPSJBM͕ΫΦϦςΟߴ͔ͬͨͰ͢ • ྆ํ࢖ͬͯࣗ෼ʹ߹ͬͨ΄͏Λ࢖͏ͷ͕ྑ͍ͱࢥ͍·͢ • ࢼ͢ʹ΋͕͔͔࣌ؒΔ͚Ͳʜ • ͍ͣΕ΋ૉͷ 1Z5PSDIΑΓ͸டংΛײ͡ΒΕΔ • ؾʹͳΔਓ͸ԼهͰݕࡧͯ͠Έ·͠ΐ͏ • lQZUPSDI JHOJUFz lQZUPSDI DBUBMZTUz lQZUPSDI MJHIUOJOHz • ্ه͸͍ͣΕ΋ެࣜ IUUQTQZUPSDIPSHFDPTZTUFN Ͱ঺հ͞ΕͯΔ
  14. 32.

    ͓·͚ɿίϯϖʹ଱͑͏Δ 1Z5PSDI-JHIUOJOH • ͔͜͜Β͸ ,BHHMFͷ l6OEFSTUBOEJOH$MPVETGSPN 4BUFMMJUF*NBHFT Ӣίϯϖ z༻ʹ޻෉ͨ͠෦෼Λ঺հ͠·͢ •

    IUUQTHJUIVCDPNZVLLZP,BHHMF6OEFSTUBOEJOH$MPVETUITPMVUJPO • ΦϨΦϨ 1Z5PSDI-JHIUOJOHʹͳͬͯ͠·ͬͯΔͷͰ஫ҙ • ࣗ͝਎Ͱ֦ு͢ΔώϯτʹͳΕ͹ͱࢥ͍·͢ • FY͜͜Β΁ΜΛม͍͑ͨͱ͖͸͜͜Λมߋͪ͠Ό͑͹ྑ͍Μͩͳ
  15. 33.

    ͓·͚ɿίϯϖʹ଱͑͏Δ 1Z5PSDI-JHIUOJOH • ओͳมߋ఺ • %JTUSJCVUFE4BNQMFS 1Z5PSDI-JHIUOJOH͸ؔ܎ͳ͍ • ࢦఆͨ͠ QPTJUJWFOFHBUJWFൺ཰Λ࢖༻͢Δ

    • 5SBJOFS ӢίϯϖͰ͸ద༻͸͠·ͤΜͰ͕ͨ͠ʜ • ຖ FQPDIຖʹ QPTJUJWFOFHBUJWFΛมߋͰ͖ΔΑ͏ʹͨ͠ • -PHHFS -JHIUOJOH-PHHFS#BTF • ෆཁͳ΋ͷΛอଘ͠ͳ͍Α͏ʹͯ͠࠷௿ݶͷ΋ͷ͚ͩอଘ͢ΔΑ͏ʹͨ͠ • ೖྗύϥϝʔλҰཡͱ͔͸ࣗ෼Ͱ :".-Ͱอ࣋ͯ͠ΔͷͰʜ • $IFDLQPJOU .PEFM$IFDLQPJOU • ҎԼͷೋछྨͷॏΈΛ྆ํอଘͰ͖ΔΑ͏ʹͨ͠ σϑΥϧτ͸ยํͷΈ • ࠷৽ FQPDIͷ XFJHIU MBUFTUQU #FTU-PTTͷ XFJHIU CFTU@MPTTQU • ͜Ε͸ JTTVFͳΜͩΑͳ • l DLQUzʹ͢Δͱ 1Z5PSDI-JHIUOJOHͷ໋໊نଇʹै͏ඞཁ͋Γ ໘౗
  16. 37.