Slide 1

Slide 1 text

܀ྛ݈ଠ࿠ʢ(.0ϖύϘגࣜձࣾɺ๺཮ઌ୺Պֶٕज़େֶӃେֶʣ /FSWFT+1/YΛ৮ͬͯΈΔճʢ೥݄೔ʣ NxͰMNISTͷखॻ͖਺ࣈը૾෼ྨΛࢼ͢

Slide 2

Slide 2 text

܀ྛ݈ଠ࿠BLB͋ΜͪΆ IUUQTLFOUBSPLVSJCBZBTIJDPN ɾ(.0ϖύϘגࣜձࣾऔక໾$50 ɾҰൠࣾஂ๏ਓ೔ຊ$50ڠձཧࣄ ๺཮ઌ୺Պֶٕज़େֶӃେֶʢ+"*45ʣത ࢜લظ՝ఔࡏֶதͷࣾձਓֶੜͰ΋͋ Δɻ *P5ؔ࿈ͷݚڀΛ४උ͍ͯ͠Δͱ͜Ζʢ ݄ʹ/FSWFT͕ग़ͯ͘Δݚڀใࠂ࿦จʹͭ ͍ͯൃද͠·͢ʣɻ ࣗݾ঺հ 2

Slide 3

Slide 3 text

/Y /VNFSJDBM&MJYJS JTOPXQVCMJDMZBWBJMBCMF%BTICJU#MPH IUUQTEBTICJUDPCMPHOYOVNFSJDBMFMJYJSJTOPXQVCMJDMZBWBJMBCMF

Slide 4

Slide 4 text

*OUSPEVDJOH/Y+PTÉ7BMJNc-BNCEB%BZT IUUQTZPVUVCFG1,.N+Q"(8D

Slide 5

Slide 5 text

ಈըΛ؍ͯΔ͚ͩͰ͸Θ͔Βͳ͍ͷͰ ϥΠϒίʔσΟϯάΛࣸܦͰ࠶ݱͨ͠

Slide 6

Slide 6 text

+OOOY+PTÉ`T/FVSBM/FUXPSLXJUI/Y IUUQTHJUIVCDPNLFOUBSPKOOOY

Slide 7

Slide 7 text

͜Μͳײ͡ͰKeras෩ʹࢼͤ·͢ ./*45σʔλͷಡΈࠐΈ [x_train, y_train, x_test, y_test] = Jnnnx.MNIST.Dataset.load_data() σʔλͷ੔ܗͱਖ਼نԽ x_train = x_train |> Nx.reshape({60000, 28*28}, names: [:batch, :input]) |> Nx.divide(255) x_test = x_test |> Nx.reshape({10000, 28*28}, names: [:batch, :input]) |> Nx.divide(255) POFIPUFODPEJOH y_train = y_train |> Jnnnx.Utils.to_categorical(10, names: [:batch, :output]) y_test = y_test |> Jnnnx.Utils.to_categorical(10, names: [:batch, :output]) τϨʔχϯάσʔλΛ༻ֶ͍ͯश params = Jnnnx.fit(x_train, y_train, epoch: 5, batch_size: 50, learning_rate: 0.01) ςετσʔλΛ༻͍ͯධՁ score = Jnnnx.evaluate(params, x_test, y_test) IO.puts("Accuracy: #{Nx.to_scalar(score)}")

Slide 8

Slide 8 text

ૉͷ&MJYJS$16ʢ&9-"Λ༻͍ͳ͍ʣͰ࣮ߦͨ݁͠Ռ˞ ֶश݁ՌʢΤϙοΫ5ɺֶश཰0.01ɺֶशʹཁͨ࣌ؒ͠: ൒೔͙Β͍ʣ ˞&9-"$16΋ಈ͔ͯ͠Έ͕ͨɺܻ୆Ͱ଎͘ͳΔʢ࣍ϖʔδʣͱ͸͍͑ݩ͕஗ա͗ΔͷͰಉֶ͡शΛ΋͏Ұ౓΍Δ͜ͱ͸͠ͳ͔ͬͨɻ

Slide 9

Slide 9 text

4PGUNBYؔ਺ͷ࣮ߦํࣜ͝ͱͷϕϯνϚʔΫ݁Ռ IUUQTHJUIVCDPNFMJYJSOYOYUSFFNBJOOYOVNFSJDBMEFGJOJUJPOT

Slide 10

Slide 10 text

˔ +PTÉͷϥΠϒίʔσΟϯάಈըΛ؍ͳ͕Βࣸܦͨ͠ ˔ ػցֶशϥΠϒϥϦͷΑ͏ʹ࢖͑ΔΑ͏ʹ੔ཧͨ͠ ˓ ࣸܦͨ͠ίʔυΛϥΠϒϥϦͬΆ͍ϑΝΠϧߏ଄Ͱ഑ஔ ˓ ϋΠύʔύϥϝλΛؔ਺ͷҾ਺ͱͯ͠౉ͤΔΑ͏ʹͨ͠ ˔ ./*45ͷσʔληοτΛऔಘ͢ΔϞδϡʔϧΛ௥Ճͨ͠ ˔ ֶशͨ͠ϞσϧΛɺςετσʔλʹΑͬͯධՁ͢Δؔ਺Λ௥Ճͨ͠ ˠಈըͰσϞͯͨ͠ίʔυͷݩʹͳ͍ͬͯΔ΋ͷͱࢥΘΕΔ΋ͷ͕ FYMBͷ΄͏ͷFYBNQMFTʹ͋ͬͨʂ˞ ΍ͬͨ͜ͱ ˞IUUQTHJUIVCDPNFMJYJSOYOYCMPCNBJOFYMBFYBNQMFTNOJTUFYT

Slide 11

Slide 11 text

˔ ݱঢ়Ͱ͸ϨΠϠʔͷߏ੒ɺ׆ੑԽؔ਺ɺଛࣦؔ਺౳ΛܾΊଧͪʹ͠ ͍ͯΔ͕ɺࣗ༝ʹ૊Έ߹ΘͤΒΕΔΑ͏ʹ͢Δ͜ͱ ˓ ͦͷ͋ͨΓ·Ͱ΍Δͱ΋͏গ͠ϥΠϒϥϦͬΆ͘ͳΔ ˓ ͍·͸୯ʹॲཧΛͦΕͬΆ͘ݟ͑ΔΑ͏ʹ·ͱΊ͚ͨͩ ˔ &9-"Λ࢖ͬͯ(16Ͱܭࢉ͢Δ͜ͱ˞ ·ͩ΍ͬͯͳ͍͜ͱ ˞+FUTPO/BOP(#Ͱࢼ͔͕ͨͬͨ͠ɺϕλϕλ৮ͬͨΓ͍͔ͨͤ͠ىಈ͠ͳ͘ͳͬ

Slide 12

Slide 12 text

͜Ε͔Βඞཁͳ΋ͷ͕੝Γͩ͘͞Μʂ IUUQTZPVUVCFG1,.N+Q"(8D U

Slide 13

Slide 13 text

˔ ݱঢ়͸ɺςϯιϧͷܭࢉ΍ࣗಈඍ෼౳ͷɺσΟʔϓϥʔχϯάΛ͢Δ ্ͰجຊͱͳΔϏϧσΟϯάϒϩοΫ͕Ͱ͖ͨͱ͜Ζ ˔ 5FOTPSGMPX,FSBTɺ1Z5PSDIɺTDJLJUMFBSOͷΑ͏ͳػցֶशϑϨʔ ϜϫʔΫ͕͋Δͱ͍͍ͳ͋ ˠͦΜͳؾ࣋ͪ΋͋ͬͯࠓճɺࡶʹࢼͯ͠ΈͨΓͨ͠ͷͰͨ͠ ˠʰθϩ͔Β࡞Δ%FFQ-FBSOJOH⁠ʕϑϨʔϜϫʔΫฤʱΛಡΈͳ ͕Βࢼ͠ʹ࡞Γ࢝ΊͯΈ͚ͨͲ͏·͍͜ͱઃܭͰ͖ͳ͍ͯͬͨ͘Μ͋ ͖ΒΊ·ͨ͠ʢؔ਺ܕݴޠ೴ʹͳΓ͖Εͯͳ͍ʜʜʣ ࠓޙ΁ͷظ଴