{"id":6866,"date":"2016-12-08T10:00:57","date_gmt":"2016-12-08T01:00:57","guid":{"rendered":"http:\/\/sitest.jp\/blog\/?p=6866"},"modified":"2016-12-06T21:39:10","modified_gmt":"2016-12-06T12:39:10","slug":"%e4%ba%ba%e5%b7%a5%e7%9f%a5%e8%83%bd%e3%83%a9%e3%82%a4%e3%83%96%e3%83%a9%e3%83%aatensorflow%e7%92%b0%e5%a2%83%e6%a7%8b%e7%af%89%e3%81%8b%e3%82%89%e3%82%84%e3%81%a3%e3%81%a6%e3%81%bf%e3%82%88%e3%81%86","status":"publish","type":"post","link":"https:\/\/sitest.jp\/blog\/?p=6866","title":{"rendered":"\u4eba\u5de5\u77e5\u80fd\u30e9\u30a4\u30d6\u30e9\u30eaTensorFlow\u74b0\u5883\u69cb\u7bc9\u304b\u3089\u3084\u3063\u3066\u307f\u3088\u3046"},"content":{"rendered":"<p>TensorFlow\u3068\u3044\u3046\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u3054\u5b58\u77e5\u3067\u3057\u3087\u3046\u304b\uff1f<br \/>\nGoogle\u304c\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u5316\u3057\u305f\u6a5f\u68b0\u5b66\u7fd2\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3042\u308a\u3001\u7c21\u5358\u306b\u6a5f\u68b0\u5b66\u7fd2\u3092\u5c0e\u5165\u3067\u304d\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u8a71\u984c\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n\u4eca\u56de\u306f\u5148\u305aTensorFlow\u306e\u5c0e\u5165\u306b\u95a2\u3057\u3066\u307e\u3068\u3081\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p><!--more--><\/p>\n<div class=\"frame_headding\">\n<h3 style=\"text-align: left;\">\u74b0\u5883\u69cb\u7bc9<\/h3>\n<\/div>\n<p>\u307e\u305a\u306a\u306b\u306f\u3068\u3082\u3042\u308cpython\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<br \/>\n\u5fc5\u8981\u306a\u30d0\u30fc\u30b8\u30e7\u30f3\u306f2.7\u4ee5\u4e0a\u3067\u3059\u3002<\/p>\n<p>Mac\u306e\u5834\u5408python\u304c\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u304a\u308a\u78ba\u8a8d\u3057\u305f\u6240OS X 10.11.13\u3067\u3059\u3068\u30d0\u30fc\u30b8\u30e7\u30f3\u304c2.7.10\u3067\u3057\u305f\u306e\u3067\u305d\u306e\u307e\u307e\u4f7f\u3048\u307e\u3059\u3002<\/p>\n<p>\u5165\u3063\u3066\u3044\u306a\u3044\u5834\u5408\u306f\u4e0b\u8a18\u306e\u624b\u9806\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3059\u3002<br \/>\n<a href=\"Python.org\/downloads\">Python.org\/downloads<\/a>\u306b\u30a2\u30af\u30bb\u30b9\u3057dmg\u30d5\u30a1\u30a4\u30eb\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<\/p>\n<p>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u5b9f\u884c\u3059\u308c\u3070\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3059\u3002<br \/>\n\u7279\u5225\u306a\u8a2d\u5b9a\u7b49\u306f\u306a\u3044\u306e\u3067next\u3092\u9078\u3093\u3067\u3044\u3051\u3070\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u6642Path\u306e\u8a2d\u5b9a\u306a\u3069\u3082\u3067\u304d\u3066\u3044\u308b\u306e\u3067\u305d\u306e\u307e\u307e\u3059\u3050\u306b\u4f7f\u3048\u307e\u3059\u3002<\/p>\n<p>\u7d9a\u3044\u3066pip\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<br \/>\npip\u3068\u306f\u30d1\u30c3\u30b1\u30fc\u30b8\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0\u3067node.js\u3067\u8a00\u3046\u6240\u306enpm\u306b\u5f53\u305f\u308a\u307e\u3059\u3002<\/p>\n<pre><code>sudo easy_install pip\n<\/code><\/pre>\n<p>\u6b21\u306bvirtualenv\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<br \/>\nvirtualenv\u306fpython\u306e\u5b9f\u884c\u74b0\u5883\u3092\u4eee\u60f3\u7684\u306b\u63d0\u4f9b\u3057\u307e\u3059\u3002<\/p>\n<pre><code>sudo pip install --upgrade virtualenv\n<\/code><\/pre>\n<p>\u30db\u30fc\u30e0\u76f4\u4e0b\u306etensorflow\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306bvirtualenv\u74b0\u5883\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre><code>virtualenv --system-site-packages ~\/tensorflow\n<\/code><\/pre>\n<p>activate\u3092\u5b9f\u884c\u3057virtualenv\u74b0\u5883\u306b\u5165\u308a\u307e\u3059\u3002<\/p>\n<pre><code>source ~\/tensorflow\/bin\/activate\n<\/code><\/pre>\n<p>(tensorflow)\u304c\u6700\u521d\u306b\u304f\u308b\u3088\u3046\u306b\u306a\u308c\u3070\u6210\u529f\u3067\u3059\u3002<\/p>\n<p>\u3042\u3068\u306fTensorFlow\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308c\u3070\u6e96\u5099\u5b8c\u4e86\u3067\u3059\u3002<\/p>\n<pre><code>pip install --upgrade https:\/\/storage.googleapis.com\/tensorflow\/mac\/tensorflow-0.5.0-py2-none-any.whl\n<\/code><\/pre>\n<div class=\"frame_headding\">\n<h3 style=\"text-align: left;\">\u5b9f\u969b\u4f7f\u3063\u3066\u307f\u308b<\/h3>\n<\/div>\n<p>\u3067\u306f\u5b9f\u969b\u4f7f\u3063\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre><code>import tensorflow as tf\n\nnum = tf.constant(100)\n\nprint(num)\n<\/code><\/pre>\n<p>\u4e0a\u3092\u5b9f\u884c\u3059\u308b\u3068<\/p>\n<pre><code>Tensor(\"Const:0\", shape=TensorShape([]), dtype=int32)\n<\/code><\/pre>\n<p>\u3068\u8fd4\u3063\u3066\u304d\u307e\u3059\u3002<br \/>\nConst\u306f\u5b9a\u6570\u3001shape\u306f\u884c\u5217\u306e\u6b21\u6570\u3001dtype\u306f\u30c7\u30fc\u30bf\u306e\u30bf\u30a4\u30d7(\u4eca\u56de\u306f\u6574\u6570\u578b\u3067\u3059)\u3092\u793a\u3057\u307e\u3059\u3002<\/p>\n<p>1\u884c\u76ee\u3067TensorFlow\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057tf\u3068\u3044\u3046\u5909\u6570\u3068\u3057\u3066\u4f7f\u7528\u3057\u307e\u3059\u3002<br \/>\n2\u884c\u76ee\u4ee5\u964d\u3067tf\u304c\u6301\u3064\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n\u3053\u308c\u3067TensorFlow\u3092\u4f7f\u7528\u3059\u308b\u6e96\u5099\u304c\u6574\u3044\u307e\u3057\u305f\u3002<\/p>\n<div class=\"frame_headding\">\n<h3 style=\"text-align: left;\">\u307e\u3068\u3081<\/h3>\n<\/div>\n<p>\u4eca\u56de\u306fTensorFlow\u3092\u5b9f\u969b\u306b\u4f7f\u3046\u306b\u3042\u305f\u308a\u74b0\u5883\u3092\u6574\u3048\u3066\u307f\u307e\u3057\u305f\u3002<br \/>\npython\u306f2\u7cfb\u30683\u7cfb\u3067\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u4e92\u63db\u6027\u304c\u306a\u304b\u3063\u305f\u308a\u3068\u656c\u9060\u3057\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u74b0\u5883\u306e\u69cb\u7bc9\u306f\u601d\u3044\u306e\u5916\u7c21\u5358\u3067\u3057\u305f\u3002<br \/>\n\u307e\u305fvirtualenv\u3092\u4f7f\u3048\u30702\u7cfb\u30683\u7cfb\u3092\u5171\u5b58\u3055\u305b\u308b\u3053\u3068\u3082\u53ef\u80fd\u306a\u3088\u3046\u3067\u3059\u306e\u3067\u3001\u30c9\u30f3\u30c9\u30f3\u8a66\u3057\u3066\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n\u666e\u6bb5node.js\u3092\u4e3b\u306b\u4f7f\u3063\u3066\u3044\u308b\u3053\u3068\u3082\u3042\u308apython\u306e\u5b9f\u884c\u74b0\u5883\u3092\u6574\u3048\u308b\u306e\u306f\u65b0\u9bae\u3067\u3057\u305f\u3002<br \/>\n\u6b21\u56de\u306f\u5b9f\u969b\u306b\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u9032\u3081\u4f7f\u3044\u65b9\u3092\u5b66\u3093\u3067\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>TensorFlow\u3068\u3044\u3046\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u3054\u5b58\u77e5\u3067\u3057\u3087\u3046\u304b\uff1f Google\u304c\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u5316\u3057\u305f\u6a5f\u68b0\u5b66\u7fd2\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3042\u308a\u3001\u7c21\u5358\u306b\u6a5f\u68b0\u5b66\u7fd2\u3092\u5c0e\u5165\u3067\u304d\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u8a71\u984c\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002 \u4eca\u56de\u306f\u5148\u305aTensorFlow\u306e\u5c0e\u5165\u306b\u95a2\u3057\u3066\u307e\u3068\u3081\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"author":3,"featured_media":6868,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[25,27,49],"tags":[],"acf":false,"_links":{"self":[{"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/posts\/6866"}],"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=6866"}],"version-history":[{"count":3,"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/posts\/6866\/revisions"}],"predecessor-version":[{"id":6902,"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/posts\/6866\/revisions\/6902"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/media\/6868"}],"wp:attachment":[{"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/media?parent=6866"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/categories?post=6866"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/tags?post=6866"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}