{"id":2438,"date":"2017-07-11T19:21:55","date_gmt":"2017-07-11T10:21:55","guid":{"rendered":"http:\/\/nantoka.filmm.info\/blog\/?p=2438"},"modified":"2017-07-11T21:05:18","modified_gmt":"2017-07-11T12:05:18","slug":"tesorflow-on-raspi3-with-pyton3-4","status":"publish","type":"post","link":"https:\/\/nantoka.filmm.info\/blog\/?p=2438","title":{"rendered":"TesorFlow on Raspi3 with Pyton3.4"},"content":{"rendered":"<p>\u53c2\u8003\u30b5\u30a4\u30c81\uff08<a href=\"http:\/\/qiita.com\/mix_dvd\/items\/6b38859148a988c3fe06\">\u3053\u3053<\/a>\uff09<\/p>\n<p>\u203b\u53c2\u8003\u30b5\u30a4\u30c8\uff11\u306ehello-tf.py\u306f\u52d5\u304b\u306a\u3044<\/p>\n<p>\uff08\u3042\u3068 Keras\u3068\u304b\u5165\u308c\u3066\u307f\u305f\uff09<\/p>\n<p>\u3053\u3053\u3067\u51fa\u3066\u305f\u30a8\u30e9\u30fc<\/p>\n<pre class=\"lang:default decode:true \">pi@sogalab1:~\/projects $ sudo python3 hello-tf.py\r\n  File \"hello-tf.py\", line 16\r\n    print sess.run(a+b)\r\n             ^\r\nSyntaxError: invalid syntax\r\n<\/pre>\n<h4>\u6539\u5584\u7b56<\/h4>\n<pre class=\"lang:default mark:11,12,16,17 decode:true\" title=\"hello-tf.py\">import tensorflow as tf\r\nimport multiprocessing as mp\r\n\r\ncore_num = mp.cpu_count()\r\nconfig = tf.ConfigProto(\r\n    inter_op_parallelism_threads=core_num,\r\n    intra_op_parallelism_threads=core_num )\r\nsess = tf.Session(config=config)\r\n\r\nhello = tf.constant('hello, tensorflow!')\r\nresult = sess.run(hello)\r\nprint (result)\r\n\r\na = tf.constant(10)\r\nb = tf.constant(32)\r\nresult1 = sess.run(a+b)\r\nprint (result1)\r\n<\/pre>\n<h5>\u5b9f\u884c\u7d50\u679c<\/h5>\n<pre class=\"lang:default decode:true \">pi@sogalab1:~\/projects $ sudo python3 hello-tf.py\r\nb'hello, tensorflow!'\r\n42\r\n<\/pre>\n<p>\u304a\u3064\u304b\u308c\u3055\u307e\u3067\u3057\u305f<\/p>\n<p>print\u5185\u3067\u8a08\u7b97\u306f\u3067\u304d\u306a\u3044\u307f\u305f\u3044\u3067\uff0c\u5358\u306b\u5909\u6570\u3060\u3051\u306b\u3057\u305f\u65b9\u304c\u3088\u3055\u3052\u3067\u3059<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u53c2\u8003\u30b5\u30a4\u30c81\uff08\u3053\u3053\uff09 \u203b\u53c2\u8003\u30b5\u30a4\u30c8\uff11\u306ehello-tf.py\u306f\u52d5\u304b\u306a\u3044 \uff08\u3042\u3068 Keras\u3068\u304b\u5165\u308c\u3066\u307f\u305f\uff09 \u3053\u3053\u3067\u51fa\u3066\u305f\u30a8\u30e9\u30fc pi@sogalab1:~\/projects $ sudo python3 hello-tf &hellip; <a href=\"https:\/\/nantoka.filmm.info\/blog\/?p=2438\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">TesorFlow on Raspi3 with Pyton3.4<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41,45,43,48,47],"tags":[],"class_list":["post-2438","post","type-post","status-publish","format-standard","hentry","category-ai","category-raspberypi","category-tensorflow","category-48","category-47"],"_links":{"self":[{"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2438","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2438"}],"version-history":[{"count":8,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2438\/revisions"}],"predecessor-version":[{"id":2456,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2438\/revisions\/2456"}],"wp:attachment":[{"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2438"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2438"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2438"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}