{"id":18376222,"url":"https://github.com/bunji2/study_chainer_mnist","last_synced_at":"2025-04-11T04:42:27.479Z","repository":{"id":95710025,"uuid":"59408904","full_name":"bunji2/study_chainer_mnist","owner":"bunji2","description":"Study of Chainer + MNIST (described in Japanese)","archived":false,"fork":false,"pushed_at":"2020-01-26T15:12:33.000Z","size":294,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-11T04:42:24.495Z","etag":null,"topics":["chainer","mnist","python","python2"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bunji2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-05-22T11:31:54.000Z","updated_at":"2020-02-08T12:09:43.000Z","dependencies_parsed_at":"2023-05-21T17:15:35.456Z","dependency_job_id":null,"html_url":"https://github.com/bunji2/study_chainer_mnist","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bunji2%2Fstudy_chainer_mnist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bunji2%2Fstudy_chainer_mnist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bunji2%2Fstudy_chainer_mnist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bunji2%2Fstudy_chainer_mnist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bunji2","download_url":"https://codeload.github.com/bunji2/study_chainer_mnist/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248345281,"owners_count":21088242,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chainer","mnist","python","python2"],"created_at":"2024-11-06T00:22:17.807Z","updated_at":"2025-04-11T04:42:27.441Z","avatar_url":"https://github.com/bunji2.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n## はじめに\n\nChainer の MNIST を用いた多層パーセプトロンのサンプルを改造してみる。\n\n|スクリプト|概要|改造の有無|\n|:--|:--|:--|\n|data.py|MNISTのデータセットを取得するスクリプト|なし|\n|net.py|ニューラルネットワークを定義するスクリプト。単純パーセプトロン MnistSP、多層パーセプトロン MnistMLP、畳み込みニューラルネット MnistCNN を定義する。|あり|\n|train_mnist.py|data.py と net.py を使った学習用スクリプト。|あり|\n\n\n## train_mnist.py\n\n- 処理内容\n\nMNIST のデータセットを使って学習する。\n\n- コマンドライン\n\n```\ntran_mnist.py --net2 [sp|mlp|cnn]\n```\n\n--net2 オプションを追加。\n\n|値|概要|\n|:--|:--|\n|sp|単純パーセプトロン|\n|mlp|多層パーセプトロン|\n|cnn|畳み込みニューラルネット|\n\n- 実行例\n```\n\\# train_mnist.py --net2 mlp\n```\n\n## classify.py\n\n- 処理内容\n\n0～9 の手書き数字の画像を分類する。\n\n- コマンドライン\n\n```\nUsage: classify.py [sp|mlp|cnn] model_path image_path\n```\n\n第一引数：使用するニューラルネット\n第二引数：train_mnist.py で作成したモデルデータのパス\n第三引数：分類対象となる手書き数字の画像データのパス\n\n|第一引数の値|概要|\n|:--|:--|\n|sp|単純パーセプトロン|\n|mlp|多層パーセプトロン|\n|cnn|畳み込みニューラルネット|\n\n- 実行例\n\n```\n\\# python classify.py cnn model.cnn.npz number/four.png\ninput:  number/four.png\noutput:\n        0: -14.180834\n        1: 2.686594\n        2: -2.928259\n        3: -28.385714\n        4: 12.872291\n        5: -14.222157\n        6: -5.834879\n        7: -9.659436\n        8: -16.648321\n        9: -11.859789\nclass:  4\n```\n\nCNN で入力画像を分類した結果が「4」であることを示す。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbunji2%2Fstudy_chainer_mnist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbunji2%2Fstudy_chainer_mnist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbunji2%2Fstudy_chainer_mnist/lists"}