{"id":1201,"date":"2016-03-24T11:28:11","date_gmt":"2016-03-24T11:28:11","guid":{"rendered":"http:\/\/blog.themusio.com\/?p=1201"},"modified":"2024-05-01T11:26:05","modified_gmt":"2024-05-01T02:26:05","slug":"theano-theano-python-language-library","status":"publish","type":"post","link":"https:\/\/blog.themusio.com\/?p=1201","title":{"rendered":"Theano: Theano Python Language Library"},"content":{"rendered":"<p><strong>Goal<br \/>\n<\/strong>In this ongoing summary we give a first introduction to the theano library, its basic functionality and usage in th field neural networks.<\/p>\n<p><strong>Motivation<\/strong><br \/>\nThe need for such a library is based on easily handling tensorial objects, like multi-array input data and weights in neural networks.<br \/>\nOf particular interest are symbolic operations that can perform differentiation as need for the backpropagation algorithm in order to update the models according to the seen training data.<br \/>\nA core functionality of libraries nowadays is to make use of GPUs in order to efficiently distribute the huge amount of computing operations.<\/p>\n<p><strong>Ingredients<\/strong><br \/>\nsymbolic operations, numpy, python<\/p>\n<p><strong>Steps<\/strong><br \/>\nThe theano library is an open source project lead by a machine learning group associated with a university.<br \/>\nIt nicely integrates the NumPy library widely used in the scientific community and makes use of the computational power of GPUs.<\/p>\n<p>Among its basic features are algebraic operations on vectors, matrices and multi-dimensional arrays.<br \/>\nThese objects have to be defined abstractly in advance together with the operations in which they appear.<br \/>\nTheano now allows to pass these objects and the computational steps to a function that is first compiled and can be later called on instances of the abstract objects.<\/p>\n<p>An extremely useful type of objects are so-called shared variables.<br \/>\nOnce defined this can be used among multiple functions and updated accordingly.<br \/>\nThis allows for an easy way to implement an updating mechanism for the weights of a neural network.<\/p>\n<p>A major advantage of the theano library is its use of symbolic operations for differentiation.<br \/>\nIn particular the theano.grad allows to differentiate previous defined functions with respect to any kind of parameters.<br \/>\nEspecially in neural networks where the optimization of the weights is handled by the backpropagation algorithm calculating gradients through layers according to the chain rule is of great importance.<\/p>\n<p>Finally, the scan function allows to take care of loops.<br \/>\nThe advantage of this function over the standard Python looping is its memory allocation.<br \/>\nFurther, the outputs at each time-step can be nicely gathered into new objects which is necessary for building recurrent layers.<\/p>\n<p><strong>Outlook<\/strong><br \/>\nThe theano library is very useful to build up neural networks from ground up.<br \/>\nFor quick implementations of standard neural networks one might want to rely on neural network libraries like keras which are build on top of theano.<\/p>\n<p>However, certain neural network architectures as proposed in the latest research papers exceed the functionality of such libraries and theano is a good starting point.<\/p>\n<p><strong>Resources<br \/>\n<\/strong>&#8220;<a href=\"http:\/\/deeplearning.net\/software\/theano\/\" target=\"_blank\" rel=\"noopener\">Theano<\/a>&#8221; (WEB). <em>Theano<\/em>. Accessed 24 March 2016.<br \/>\n&#8220;<a href=\"http:\/\/deeplearning.net\/software\/theano\/\" target=\"_blank\" rel=\"noopener\">Deep Learning Tutorials<\/a>&#8221; (WEB). <em>Deep Learning Tutorials<\/em>.\u00a0Accessed 24 March 2016.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Goal In this ongoing summary we give a first introduction to the theano library, its basic functionality and u [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[3642,3640],"tags":[3650,3652,4172,3760,3656,3762,3658,3700,4174,3702,3664,3958,4176,4178,3710,4180,3712,4182,4184,4186,4188,4190,3962,4192,4194],"class_list":["post-1201","post","type-post","status-publish","format-standard","hentry","category-ai-en","category-all-en","tag-ai-ja-en","tag-aka-ja-en","tag-algorithms-ja-en","tag-artificial-intelligence-en","tag-baggage-en","tag-children-book-ja-en","tag-christmas-en","tag-cmos-en","tag-connection-en","tag-contents-en","tag-crowd-funding-en","tag-keras-en","tag-loops-en","tag-memory-allocation-en","tag-musio-en","tag-neural-network-libraries-en","tag-neural-networks-en","tag-python-en","tag-shared-variables-en","tag-theano-en","tag--en-en","tag--en","tag--ja-en"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.9 - aioseo.com -->\n\t<meta name=\"description\" content=\"Goal In this ongoing summary we give a first introducti\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Musio Team\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/blog.themusio.com\/?p=1201\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.9\" \/>\n\t\t<meta property=\"og:locale\" content=\"ja_JP\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Musio Blog\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Theano: Theano Python Language Library | Musio Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"Goal In this ongoing summary we give a first introducti\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/blog.themusio.com\/?p=1201\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2016-03-24T11:28:11+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2024-05-01T02:26:05+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Theano: Theano Python Language Library | Musio Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Goal In this ongoing summary we give a first introducti\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/blog.themusio.com\\\/?p=1201#blogposting\",\"name\":\"Theano: Theano Python Language Library | Musio Blog\",\"headline\":\"Theano: Theano Python Language Library\",\"author\":{\"@id\":\"https:\\\/\\\/blog.themusio.com\\\/?author=2#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/blog.themusio.com\\\/#organization\"},\"datePublished\":\"2016-03-24T11:28:11+09:00\",\"dateModified\":\"2024-05-01T11:26:05+09:00\",\"inLanguage\":\"ja\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/blog.themusio.com\\\/?p=1201#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/blog.themusio.com\\\/?p=1201#webpage\"},\"articleSection\":\"A.I\\ud83c\\uddfa\\ud83c\\uddf8, All Articles, AI, AKA, Algorithms, Artificial Intelligence, Baggage, Children Book, Christmas, CMOS, connection, contents, Crowd Funding, Keras, Loops, Memory Allocation, Musio, Neural Network Libraries, Neural Networks, Python, Shared Variables, Theano, \\u82f1\\u8a9e\\u6559\\u6388\\u6cd5, \\u82f1\\u8a9e\\u6559\\u80b2, \\u82f1\\u8a9e\\u6559\\u80b2\\u6559\\u6750, \\u8912\\u3081\\u308b, \\u8912\\u3081\\u8a00\\u8449, English\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/blog.themusio.com\\\/?p=1201#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.themusio.com#listItem\",\"position\":1,\"name\":\"\\u5bb6\",\"item\":\"https:\\\/\\\/blog.themusio.com\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.themusio.com\\\/?cat=3640#listItem\",\"name\":\"All Articles\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.themusio.com\\\/?cat=3640#listItem\",\"position\":2,\"name\":\"All Articles\",\"item\":\"https:\\\/\\\/blog.themusio.com\\\/?cat=3640\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.themusio.com\\\/?cat=3642#listItem\",\"name\":\"A.I\\ud83c\\uddfa\\ud83c\\uddf8\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.themusio.com#listItem\",\"name\":\"\\u5bb6\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.themusio.com\\\/?cat=3642#listItem\",\"position\":3,\"name\":\"A.I\\ud83c\\uddfa\\ud83c\\uddf8\",\"item\":\"https:\\\/\\\/blog.themusio.com\\\/?cat=3642\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.themusio.com\\\/?p=1201#listItem\",\"name\":\"Theano: Theano Python Language Library\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.themusio.com\\\/?cat=3640#listItem\",\"name\":\"All Articles\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.themusio.com\\\/?p=1201#listItem\",\"position\":4,\"name\":\"Theano: Theano Python Language Library\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/blog.themusio.com\\\/?cat=3642#listItem\",\"name\":\"A.I\\ud83c\\uddfa\\ud83c\\uddf8\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/blog.themusio.com\\\/#organization\",\"name\":\"musio_blog\",\"description\":\"Meet Musio, Your Curious New Friend.\",\"url\":\"https:\\\/\\\/blog.themusio.com\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/blog.themusio.com\\\/?author=2#author\",\"url\":\"https:\\\/\\\/blog.themusio.com\\\/?author=2\",\"name\":\"Musio Team\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/blog.themusio.com\\\/?p=1201#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/383633914125f30a1407c18aab62c47a25a6098f59185eb06b491dccb5b8fe42?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Musio Team\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/blog.themusio.com\\\/?p=1201#webpage\",\"url\":\"https:\\\/\\\/blog.themusio.com\\\/?p=1201\",\"name\":\"Theano: Theano Python Language Library | Musio Blog\",\"description\":\"Goal In this ongoing summary we give a first introducti\",\"inLanguage\":\"ja\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blog.themusio.com\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/blog.themusio.com\\\/?p=1201#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/blog.themusio.com\\\/?author=2#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/blog.themusio.com\\\/?author=2#author\"},\"datePublished\":\"2016-03-24T11:28:11+09:00\",\"dateModified\":\"2024-05-01T11:26:05+09:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/blog.themusio.com\\\/#website\",\"url\":\"https:\\\/\\\/blog.themusio.com\\\/\",\"name\":\"musio_blog\",\"description\":\"Meet Musio, Your Curious New Friend.\",\"inLanguage\":\"ja\",\"publisher\":{\"@id\":\"https:\\\/\\\/blog.themusio.com\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Theano: Theano Python Language Library | Musio Blog","description":"Goal In this ongoing summary we give a first introducti","canonical_url":"https:\/\/blog.themusio.com\/?p=1201","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/blog.themusio.com\/?p=1201#blogposting","name":"Theano: Theano Python Language Library | Musio Blog","headline":"Theano: Theano Python Language Library","author":{"@id":"https:\/\/blog.themusio.com\/?author=2#author"},"publisher":{"@id":"https:\/\/blog.themusio.com\/#organization"},"datePublished":"2016-03-24T11:28:11+09:00","dateModified":"2024-05-01T11:26:05+09:00","inLanguage":"ja","mainEntityOfPage":{"@id":"https:\/\/blog.themusio.com\/?p=1201#webpage"},"isPartOf":{"@id":"https:\/\/blog.themusio.com\/?p=1201#webpage"},"articleSection":"A.I\ud83c\uddfa\ud83c\uddf8, All Articles, AI, AKA, Algorithms, Artificial Intelligence, Baggage, Children Book, Christmas, CMOS, connection, contents, Crowd Funding, Keras, Loops, Memory Allocation, Musio, Neural Network Libraries, Neural Networks, Python, Shared Variables, Theano, \u82f1\u8a9e\u6559\u6388\u6cd5, \u82f1\u8a9e\u6559\u80b2, \u82f1\u8a9e\u6559\u80b2\u6559\u6750, \u8912\u3081\u308b, \u8912\u3081\u8a00\u8449, English"},{"@type":"BreadcrumbList","@id":"https:\/\/blog.themusio.com\/?p=1201#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/blog.themusio.com#listItem","position":1,"name":"\u5bb6","item":"https:\/\/blog.themusio.com","nextItem":{"@type":"ListItem","@id":"https:\/\/blog.themusio.com\/?cat=3640#listItem","name":"All Articles"}},{"@type":"ListItem","@id":"https:\/\/blog.themusio.com\/?cat=3640#listItem","position":2,"name":"All Articles","item":"https:\/\/blog.themusio.com\/?cat=3640","nextItem":{"@type":"ListItem","@id":"https:\/\/blog.themusio.com\/?cat=3642#listItem","name":"A.I\ud83c\uddfa\ud83c\uddf8"},"previousItem":{"@type":"ListItem","@id":"https:\/\/blog.themusio.com#listItem","name":"\u5bb6"}},{"@type":"ListItem","@id":"https:\/\/blog.themusio.com\/?cat=3642#listItem","position":3,"name":"A.I\ud83c\uddfa\ud83c\uddf8","item":"https:\/\/blog.themusio.com\/?cat=3642","nextItem":{"@type":"ListItem","@id":"https:\/\/blog.themusio.com\/?p=1201#listItem","name":"Theano: Theano Python Language Library"},"previousItem":{"@type":"ListItem","@id":"https:\/\/blog.themusio.com\/?cat=3640#listItem","name":"All Articles"}},{"@type":"ListItem","@id":"https:\/\/blog.themusio.com\/?p=1201#listItem","position":4,"name":"Theano: Theano Python Language Library","previousItem":{"@type":"ListItem","@id":"https:\/\/blog.themusio.com\/?cat=3642#listItem","name":"A.I\ud83c\uddfa\ud83c\uddf8"}}]},{"@type":"Organization","@id":"https:\/\/blog.themusio.com\/#organization","name":"musio_blog","description":"Meet Musio, Your Curious New Friend.","url":"https:\/\/blog.themusio.com\/"},{"@type":"Person","@id":"https:\/\/blog.themusio.com\/?author=2#author","url":"https:\/\/blog.themusio.com\/?author=2","name":"Musio Team","image":{"@type":"ImageObject","@id":"https:\/\/blog.themusio.com\/?p=1201#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/383633914125f30a1407c18aab62c47a25a6098f59185eb06b491dccb5b8fe42?s=96&d=mm&r=g","width":96,"height":96,"caption":"Musio Team"}},{"@type":"WebPage","@id":"https:\/\/blog.themusio.com\/?p=1201#webpage","url":"https:\/\/blog.themusio.com\/?p=1201","name":"Theano: Theano Python Language Library | Musio Blog","description":"Goal In this ongoing summary we give a first introducti","inLanguage":"ja","isPartOf":{"@id":"https:\/\/blog.themusio.com\/#website"},"breadcrumb":{"@id":"https:\/\/blog.themusio.com\/?p=1201#breadcrumblist"},"author":{"@id":"https:\/\/blog.themusio.com\/?author=2#author"},"creator":{"@id":"https:\/\/blog.themusio.com\/?author=2#author"},"datePublished":"2016-03-24T11:28:11+09:00","dateModified":"2024-05-01T11:26:05+09:00"},{"@type":"WebSite","@id":"https:\/\/blog.themusio.com\/#website","url":"https:\/\/blog.themusio.com\/","name":"musio_blog","description":"Meet Musio, Your Curious New Friend.","inLanguage":"ja","publisher":{"@id":"https:\/\/blog.themusio.com\/#organization"}}]},"og:locale":"ja_JP","og:site_name":"Musio Blog","og:type":"article","og:title":"Theano: Theano Python Language Library | Musio Blog","og:description":"Goal In this ongoing summary we give a first introducti","og:url":"https:\/\/blog.themusio.com\/?p=1201","article:published_time":"2016-03-24T11:28:11+00:00","article:modified_time":"2024-05-01T02:26:05+00:00","twitter:card":"summary_large_image","twitter:title":"Theano: Theano Python Language Library | Musio Blog","twitter:description":"Goal In this ongoing summary we give a first introducti"},"aioseo_meta_data":{"post_id":"1201","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"BlogPosting","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2024-04-11 10:27:10","updated":"2025-06-29 09:06:08","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/blog.themusio.com\" title=\"\u5bb6\">\u5bb6<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/blog.themusio.com\/?cat=3640\" title=\"All Articles\">All Articles<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/blog.themusio.com\/?cat=3642\" title=\"A.I\ud83c\uddfa\ud83c\uddf8\">A.I\ud83c\uddfa\ud83c\uddf8<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tTheano: Theano Python Language Library\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"\u5bb6","link":"https:\/\/blog.themusio.com"},{"label":"All Articles","link":"https:\/\/blog.themusio.com\/?cat=3640"},{"label":"A.I\ud83c\uddfa\ud83c\uddf8","link":"https:\/\/blog.themusio.com\/?cat=3642"},{"label":"Theano: Theano Python Language Library","link":"https:\/\/blog.themusio.com\/?p=1201"}],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/blog.themusio.com\/index.php?rest_route=\/wp\/v2\/posts\/1201","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.themusio.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.themusio.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.themusio.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.themusio.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1201"}],"version-history":[{"count":4,"href":"https:\/\/blog.themusio.com\/index.php?rest_route=\/wp\/v2\/posts\/1201\/revisions"}],"predecessor-version":[{"id":10893,"href":"https:\/\/blog.themusio.com\/index.php?rest_route=\/wp\/v2\/posts\/1201\/revisions\/10893"}],"wp:attachment":[{"href":"https:\/\/blog.themusio.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1201"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.themusio.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1201"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.themusio.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1201"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}