{"id":3034,"date":"2016-02-08T22:31:41","date_gmt":"2016-02-09T05:31:41","guid":{"rendered":"http:\/\/www.dresan.com\/blog\/?p=3034"},"modified":"2019-10-03T21:09:39","modified_gmt":"2019-10-04T04:09:39","slug":"why-yes-im-running-a-deep-learning-system-on-a-macbook-air-why","status":"publish","type":"post","link":"https:\/\/dresan.com\/blog\/2016\/02\/08\/why-yes-im-running-a-deep-learning-system-on-a-macbook-air-why\/","title":{"rendered":"Why yes, I&#8217;m running a deep learning system on a MacBook Air. Why?"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.dresan.com\/blog\/wp-content\/uploads\/2016\/02\/deeplearning.png\" alt=\"deeplearning.png\" width=\"600\" height=\"432\" \/><\/p>\n<p>Yep, that\u2019s Python consuming almost 300% of my CPU &#8211; guess what, I guess that means this machine has four processing cores, since I saw it hit over 300% &#8211; running the <a href=\"https:\/\/www.tensorflow.org\/\">TensorFlow<\/a> tutorial. For those that don\u2019t know, &#8220;deep learning\u201d is a relatively recent type of learning which uses improvements in both processing power and learning algorithms to train learning networks that can have dozens or hundreds of layers &#8211; sometimes as many layers as neural networks in the 1980\u2019s and 1990\u2019s had nodes.<\/p>\n<p>For those that don\u2019t know even that, neural networks are graphs of simple nodes that mimic brain structures, and you can train them with data that contains both the question and the answer. With enough internal layers, neural networks can learn almost anything, but they require a lot of training data and a lot of computing power. Well, now we\u2019ve got lots and lots of data, and with more computing power, you\u2019d expect we\u2019d be able to train larger networks &#8211; but the first real trick was discovering mathematical tricks that keep the learning signal strong deep, deep within the networks.<\/p>\n<p>The second real trick was wrapping all this amazing code in a clean software architecture that enables anyone to run the software anywhere. TensorFlow is one of the most recent of these frameworks &#8211; it\u2019s Google\u2019s attempt to package up the deep learning technology it uses internally so that everyone in the world can use it &#8211; and it\u2019s open source, so you can <a href=\"https:\/\/www.tensorflow.org\/versions\/0.6.0\/get_started\/os_setup.html\">download and install it on most computers<\/a> and <a href=\"https:\/\/www.tensorflow.org\/versions\/0.6.0\/get_started\/index.html\">try out the tutorial at home<\/a>. The CPU-baking example you see running here, however, is not the simpler tutorial, but a <a href=\"https:\/\/www.tensorflow.org\/versions\/0.6.0\/get_started\/os_setup.html#run-a-tensorflow-demo-model\">test program that runs a full deep neural network<\/a>. Let\u2019s see how it did:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.dresan.com\/blog\/wp-content\/uploads\/2016\/02\/Screenshot-2016-02-08-21.08.40.png\" alt=\"Screenshot 2016-02-08 21.08.40.png\" width=\"600\" height=\"400\" \/><\/p>\n<p>Well. 99.2% correct, it seems. Not bad for a <a href=\"https:\/\/tensorflow.googlesource.com\/tensorflow\/+\/master\/tensorflow\/models\/image\/mnist\/convolutional.py\">couple hundred lines of code<\/a>, half of which is loading the test data &#8211; and yeah, that program depends on 200+ files worth of Python that the TensorFlow installation loaded onto my MacBook Air, not to mention all the libraries that the TensorFlow Python installation depends on in turn \u2026<\/p>\n<p>But I still loaded it onto a <i>MacBook Air<\/i>, and it ran perfectly.<\/p>\n<p>Amazing what you can do with computers these days.<\/p>\n<p>-the Centaur<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Yep, that\u2019s Python consuming almost 300% of my CPU &#8211; guess what, I guess that means this machine has four processing cores, since I saw it hit over 300% &#8211;&#8230;<\/p>\n","protected":false},"author":2,"featured_media":3032,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[209,255,217],"tags":[8,31,71],"class_list":["post-3034","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-computing","category-featured","category-intelligence","tag-intelligence","tag-singularity-studies","tag-exploration-of-intelligence","ratio-2-1","entry"],"_links":{"self":[{"href":"https:\/\/dresan.com\/blog\/wp-json\/wp\/v2\/posts\/3034","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dresan.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dresan.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dresan.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/dresan.com\/blog\/wp-json\/wp\/v2\/comments?post=3034"}],"version-history":[{"count":1,"href":"https:\/\/dresan.com\/blog\/wp-json\/wp\/v2\/posts\/3034\/revisions"}],"predecessor-version":[{"id":4442,"href":"https:\/\/dresan.com\/blog\/wp-json\/wp\/v2\/posts\/3034\/revisions\/4442"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dresan.com\/blog\/wp-json\/wp\/v2\/media\/3032"}],"wp:attachment":[{"href":"https:\/\/dresan.com\/blog\/wp-json\/wp\/v2\/media?parent=3034"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dresan.com\/blog\/wp-json\/wp\/v2\/categories?post=3034"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dresan.com\/blog\/wp-json\/wp\/v2\/tags?post=3034"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}