{"id":11108,"date":"2017-10-10T10:30:16","date_gmt":"2017-10-10T01:30:16","guid":{"rendered":"http:\/\/sitest.jp\/blog\/?p=11108"},"modified":"2017-10-10T10:21:13","modified_gmt":"2017-10-10T01:21:13","slug":"chainer-%e3%81%a7-tensorflow-%e3%82%88%e3%82%8a%e6%89%8b%e8%bb%bd%e3%81%ab%e3%83%87%e3%82%a3%e3%83%bc%e3%83%97%e3%83%a9%e3%83%bc%e3%83%8b%e3%83%b3%e3%82%b0%e3%82%92%e8%a9%a6%e3%81%99","status":"publish","type":"post","link":"https:\/\/sitest.jp\/blog\/?p=11108","title":{"rendered":"Chainer \u3067 TensorFlow \u3088\u308a\u624b\u8efd\u306b\u30c7\u30a3\u30fc\u30d7\u30e9\u30fc\u30cb\u30f3\u30b0\u3092\u8a66\u3059"},"content":{"rendered":"<p>TensorFlow \u306e\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u5316\u3067\u6c17\u8efd\u306b\u30c7\u30a3\u30fc\u30d7\u30e9\u30fc\u30cb\u30f3\u30b0\u304c\u8a66\u305b\u308b\u3068\u3044\u3046\u98a8\u6f6e\u304c\u5e83\u304c\u3063\u3066\u304d\u307e\u3057\u305f\u3002\u3057\u304b\u3057\u305d\u3082\u305d\u3082 Python \u306e\u4f7f\u3044\u65b9\u3092\u899a\u3048\u305f\u308a\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u7ba1\u7406\u3057\u305f\u308a\u3068\u30d7\u30ed\u30b0\u30e9\u30e0\u7d20\u4eba\u306b\u306f\u5c11\u3057\u5c0e\u5165\u304c\u8f9b\u3044\u3082\u306e\u304c\u3042\u308a\u307e\u3057\u305f\u3002<br \/>\n\u4eca\u56de\u8a66\u3057\u3066\u307f\u305f Chainer \u306fT ensorFlow \u306b\u6bd4\u3079\u5c0e\u5165\u304c\u975e\u5e38\u306b\u7c21\u5358\u3067\u3059\u3002<\/p>\n<p><!--more--><\/p>\n<div class=\"frame_headding\">\n<h3 style=\"text-align: left;\">\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<\/div>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u624b\u9806\u3067\u3059\u304c\u3001\u4eca\u56de Mac \u3067\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002\u305d\u306e\u4ed6\u516c\u5f0f\u30b5\u30a4\u30c8\u306b Ubuntu CentOS \u3068\u3044\u3063\u305f OS \u5411\u3051\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5\u304c\u66f8\u304b\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre><code>pip install chainer\n<\/code><\/pre>\n<p>\u3053\u306e\u30b3\u30de\u30f3\u30c9\u3092\u6253\u3063\u3066<\/p>\n<pre><code>Successfully installed chainer filelock nose numpy protobuf six\n<\/code><\/pre>\n<p>Success \u304c\u8fd4\u3063\u3066\u304f\u308c\u3070\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6210\u529f\u3067\u3059\u3002<\/p>\n<p>\u3061\u306a\u307f Python \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306f 2.7 \u3067\u3059\u3002<br \/>\n\u305d\u3046\u3067\u3059\u3002 Mac \u4f7f\u3063\u3066\u308b\u65b9\u306a\u3089\u3054\u5b58\u77e5\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u6700\u8fd1\u306e MacOS \u306a\u3089\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u5165\u3063\u3066\u308b\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u3059\u3002\u3053\u308c\u306a\u3089\u30ce\u30f3\u30d7\u30ed\u30b0\u30e9\u30de\u306e\u65b9\u3067\u3082\u6b63\u306b\u30ef\u30f3\u30b3\u30de\u30f3\u30c9\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b8c\u4e86\u3057\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n<div class=\"frame_headding\">\n<h3 style=\"text-align: left;\">\u5b66\u7fd2\u3092\u8a66\u3059<\/h3>\n<\/div>\n<p>\u7d9a\u3044\u3066\u5b66\u7fd2\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u516c\u5f0f\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u30b5\u30f3\u30d7\u30eb\u304c\u3042\u308a\u307e\u3059\u3002TensorFlow \u3067\u3082\u3042\u3063\u305f mnist \u3067\u306e\u624b\u66f8\u304d\u6587\u5b57\u306e\u691c\u67fb\u3067\u3059\u3002<\/p>\n<pre><code> git clone https:\/\/github.com\/pfnet\/chainer.git\n<\/code><\/pre>\n<p>\u3053\u3061\u3089\u306e\u30b3\u30de\u30f3\u30c9\u3067\u30ea\u30dd\u30b8\u30c8\u30ea\u304c\u30af\u30ed\u30fc\u30f3\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre><code>python chainer\/examples\/mnist\/train_mnist.py\n\n<\/code><\/pre>\n<p>\u7d9a\u3044\u3066\u3053\u3061\u3089\u306e\u30b3\u30de\u30f3\u30c9\u3067\u5b66\u7fd2\u7528\u30c7\u30fc\u30bf\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3068\u5b66\u7fd2\u304c\u3055\u308c\u305d\u306e\u307e\u307e\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u3067\u691c\u8a3c\u307e\u3067\u884c\u308f\u308c\u307e\u3059\u3002<br \/>\n\u203b\u3061\u306a\u307f\u306b\u81ea\u5206\u306e\u74b0\u5883\u3067\u3059\u3068 matplotlib \u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u306a\u3044\u3068\u30a2\u30e9\u30fc\u30c8\u304c\u51fa\u3066\u307e\u3057\u305f\u306e\u3067\u3042\u3089\u304b\u3058\u3081\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<pre><code>pip install matplotlib\n<\/code><\/pre>\n<p><img loading=\"lazy\" src=\"https:\/\/storage.googleapis.com\/sitest-wp\/blog\/wp-content\/uploads\/2017\/06\/chainer_ss.png\" alt=\"\" width=\"710\" height=\"358\" class=\"alignnone size-full wp-image-11110\" \/><\/p>\n<p>\u7d50\u679c\u306f 67% \u306e\u78ba\u5ea6\u6b63\u89e3\u7387\u3067\u3057\u305f\u3002\u3053\u308c\u306f\u5b66\u7fd2\u6e08\u307f\u30e2\u30c7\u30eb\u306b\u5bfe\u3057\u3001\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u3092\u5165\u529b\u3057\u305f\u6642\u306e\u6b63\u7b54\u7387\u3068\u8003\u3048\u3066\u5927\u4e08\u592b\u3067\u3059\u3002<\/p>\n<p>\u30a4\u30de\u30a4\u30c1\u3067\u3059\u306d\u3002<br \/>\nepoch\u3000(\u4e16\u4ee3)\u304c\u300020\u3000\u3064\u307e\u308a\u540c\u3058\u30c7\u30fc\u30bf\u3092\u300020\u56de\u3000\u5b66\u7fd2\u3057\u305f\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002\u30c7\u30a3\u30fc\u30d7\u30e9\u30fc\u30cb\u30f3\u30b0\u306e\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u7684\u306b\u6700\u521d\u6570\u56de\u306f\u9069\u5f53\u306a\u5024\u3092\u5165\u308c\u305d\u3053\u304b\u3089\u5b66\u7fd2\u3092\u91cd\u306d\u308b\u306e\u3067\u3001<br \/>\n\u3053\u306e\u56de\u6570\u3092\u4e0a\u3052\u308c\u3070\u3082\u3046\u5c11\u3057\u7cbe\u5ea6\u306f\u3042\u304c\u308a\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f30\u56de\u3067\u8a66\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u30b5\u30f3\u30d7\u30eb\u306e\u30b3\u30fc\u30c9\u3067\u3059\u3068\u3001<\/p>\n<pre><code>python chainer\/examples\/mnist\/train_mnist.py -e 30\n<\/code><\/pre>\n<p>\u3067 30\u56de \u306e\u7e70\u308a\u8fd4\u3057\u5b66\u7fd2\u7d50\u679c\u3092\u898b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u4eca\u56de\u306f\u30b0\u30e9\u30d5\u306b\u51fa\u529b\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img loading=\"lazy\" src=\"https:\/\/storage.googleapis.com\/sitest-wp\/blog\/wp-content\/uploads\/2017\/06\/accuracy.png\" alt=\"\" width=\"798\" height=\"436\" class=\"alignnone size-full wp-image-11114\" \/><\/p>\n<p>\u7d50\u679c 64% \u3068\u4e0b\u304c\u3063\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002<br \/>\n\u6050\u3089\u304f\u3053\u306e\u5b66\u7fd2\u30c7\u30fc\u30bf\u304b\u3089\u5f97\u3089\u308c\u308b\u7cbe\u5ea6\u306f 70%\u524d\u5f8c \u304c\u982d\u6253\u3061\u3068\u306a\u3063\u3066\u3057\u307e\u3046\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>\u4eca\u5f8c\u306f\u56de\u6570\u3092\u3042\u3052\u305f\u3068\u3057\u3066\u3001\u6b63\u7b54\u7387\u304c\u53ce\u675f\u3057\u3066\u3044\u304f\u3060\u3051\u3068\u306a\u308a\u307e\u3059\u3002<br \/>\n\u30d0\u30c3\u30c1\u30b5\u30a4\u30ba\u3084\u5b66\u7fd2\u30c7\u30fc\u30bf\u3092\u5909\u3048\u308b\u3053\u3068\u3067\u6b63\u7b54\u7387\u3092\u3042\u3052\u3066\u3044\u304f\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>\u30ce\u30f3\u30d7\u30ed\u30b0\u30e9\u30de\u3067\u3082\u7c21\u5358\u306b\u5c0e\u5165\u3067\u30c7\u30a3\u30fc\u30d7\u30e9\u30fc\u30cb\u30f3\u30b0\u3092\u8a66\u305b\u308b Python \u306e\u30e9\u30a4\u30d6\u30e9\u30ea Chainer \u3092\u7d39\u4ecb\u3055\u305b\u3066\u3044\u305f\u3060\u304d\u307e\u3057\u305f\u3002\u5c0e\u5165\u304c\u30ef\u30f3\u30b3\u30de\u30f3\u30c9\u3067\u6e08\u3093\u3067\u3057\u307e\u3046\u7b49\u5c0e\u5165\u304c\u975e\u5e38\u306b\u697d\u3067\u3059\u3002<\/p>\n<p>\u5c0e\u5165\u304c\u7c21\u5358\u3067\u3059\u304c\u3001\u3082\u3061\u308d\u3093 GPU \u3092\u7528\u3044\u3066\u306e\u6f14\u7b97\u306a\u3069\u6b32\u3057\u3044\u6a5f\u80fd\u306f\u63c3\u3063\u3066\u3044\u3066\u62e1\u5f35\u6027\u3082\u9ad8\u3044\u306e\u3067\u307e\u305a\u30c7\u30a3\u30fc\u30d7\u30e9\u30fc\u30cb\u30f3\u30b0\u3092\u8a66\u3057\u3066\u307f\u3088\u3046\u3068\u3044\u3046\u65b9\u306b\u306f\u4e01\u5ea6\u3044\u3044\u306e\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>TensorFlow \u306e\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u5316\u3067\u6c17\u8efd\u306b\u30c7\u30a3\u30fc\u30d7\u30e9\u30fc\u30cb\u30f3\u30b0\u304c\u8a66\u305b\u308b\u3068\u3044\u3046\u98a8\u6f6e\u304c\u5e83\u304c\u3063\u3066\u304d\u307e\u3057\u305f\u3002\u3057\u304b\u3057\u305d\u3082\u305d\u3082 Python \u306e\u4f7f\u3044\u65b9\u3092\u899a\u3048\u305f\u308a\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u7ba1\u7406\u3057\u305f\u308a\u3068\u30d7\u30ed\u30b0\u30e9\u30e0\u7d20\u4eba\u306b\u306f\u5c11\u3057\u5c0e\u5165\u304c\u8f9b\u3044\u3082\u306e\u304c\u3042\u308a\u307e\u3057\u305f\u3002 \u4eca\u56de\u8a66\u3057\u3066\u307f\u305f Chainer \u306fT ensorFlow \u306b\u6bd4\u3079\u5c0e\u5165\u304c\u975e\u5e38\u306b\u7c21\u5358\u3067\u3059\u3002<\/p>\n","protected":false},"author":3,"featured_media":11117,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[25,27],"tags":[],"acf":false,"_links":{"self":[{"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/posts\/11108"}],"collection":[{"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/comments?post=11108"}],"version-history":[{"count":6,"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/posts\/11108\/revisions"}],"predecessor-version":[{"id":13356,"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/posts\/11108\/revisions\/13356"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/media\/11117"}],"wp:attachment":[{"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/media?parent=11108"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/categories?post=11108"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/tags?post=11108"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}