{"id":152,"date":"2018-12-21T14:08:35","date_gmt":"2018-12-21T13:08:35","guid":{"rendered":"http:\/\/blog.zhaw.ch\/high-performance\/?p=152"},"modified":"2018-12-21T14:08:35","modified_gmt":"2018-12-21T13:08:35","slug":"machine-learning-on-cortex-m4-using-keras-and-arm-cmsis-nn","status":"publish","type":"post","link":"https:\/\/blog.zhaw.ch\/high-performance\/2018\/12\/21\/machine-learning-on-cortex-m4-using-keras-and-arm-cmsis-nn\/","title":{"rendered":"Machine learning on Cortex-M4 using Keras and ARM-CMSIS-NN"},"content":{"rendered":"<p><em>We have <\/em><em>developed<\/em><em> a simple software&nbsp; to show how a custom keras model can be automatically translated into c-code.&nbsp;<\/em><em>The generated c-code can, in combination with the <a href=\"http:\/\/www.keil.com\/pack\/doc\/CMSIS_Dev\/NN\/html\/index.html\">ARM-CMSIS-NN<\/a> functions,&nbsp;<\/em><em>be used to run neural-net calculations in an efficient way on an embedded micro-controller such as the CORTEX-M4.&nbsp;<br \/>\n<\/em><\/p>\n<p><em>The example&nbsp;software on <\/em><a href=\"https:\/\/github.com\/InES-HPMM\/k2arm\"><em>GitHub<\/em><\/a><em>&nbsp;has also firmware which runs on the <a href=\"https:\/\/www.st.com\/en\/evaluation-tools\/stm32f4discovery.html\">STM32F4-Discorevy Board<\/a>.&nbsp;<\/em><em>Part of the firmware was generated with <a href=\"https:\/\/www.st.com\/en\/development-tools\/stm32cubemx.html\">cubeMX<\/a>. <\/em><\/p>\n<p><em>The <\/em><em>example software<\/em><em> has a MNIST classifier which can classify handwritten digits.<\/em><\/p>\n<p>See&nbsp;<a href=\"https:\/\/github.com\/InES-HPMM\/k2arm\">https:\/\/github.com\/InES-HPMM\/k2arm<\/a>&nbsp;for more Details.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We have developed a simple software&nbsp; to show how a custom keras model can be automatically translated into c-code.&nbsp;The generated c-code can, in combination with the ARM-CMSIS-NN functions,&nbsp;be used to run neural-net calculations in an efficient way on an embedded micro-controller such as the CORTEX-M4.&nbsp; The example&nbsp;software on GitHub&nbsp;has also firmware which runs on the [&hellip;]<\/p>\n","protected":false},"author":270,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[1],"tags":[],"features":[],"class_list":["post-152","post","type-post","status-publish","format-standard","hentry","category-allgemein"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Machine learning on Cortex-M4 using Keras and ARM-CMSIS-NN - Embedded High Performance Multimedia Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.zhaw.ch\/high-performance\/2018\/12\/21\/machine-learning-on-cortex-m4-using-keras-and-arm-cmsis-nn\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Machine learning on Cortex-M4 using Keras and ARM-CMSIS-NN\" \/>\n<meta property=\"og:description\" content=\"We have developed a simple software&nbsp; to show how a custom keras model can be automatically translated into c-code.&nbsp;The generated c-code can, in combination with the ARM-CMSIS-NN functions,&nbsp;be used to run neural-net calculations in an efficient way on an embedded micro-controller such as the CORTEX-M4.&nbsp; The example&nbsp;software on GitHub&nbsp;has also firmware which runs on the [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.zhaw.ch\/high-performance\/2018\/12\/21\/machine-learning-on-cortex-m4-using-keras-and-arm-cmsis-nn\/\" \/>\n<meta property=\"og:site_name\" content=\"Embedded High Performance Multimedia Blog\" \/>\n<meta property=\"article:published_time\" content=\"2018-12-21T13:08:35+00:00\" \/>\n<meta name=\"author\" content=\"rosn\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"rosn\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/blog.zhaw.ch\/high-performance\/2018\/12\/21\/machine-learning-on-cortex-m4-using-keras-and-arm-cmsis-nn\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/blog.zhaw.ch\/high-performance\/2018\/12\/21\/machine-learning-on-cortex-m4-using-keras-and-arm-cmsis-nn\/\"},\"author\":{\"name\":\"rosn\",\"@id\":\"https:\/\/blog.zhaw.ch\/high-performance\/#\/schema\/person\/e1a77329f74257615afa71bc883106c9\"},\"headline\":\"Machine learning on Cortex-M4 using Keras and ARM-CMSIS-NN\",\"datePublished\":\"2018-12-21T13:08:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/blog.zhaw.ch\/high-performance\/2018\/12\/21\/machine-learning-on-cortex-m4-using-keras-and-arm-cmsis-nn\/\"},\"wordCount\":110,\"commentCount\":0,\"articleSection\":[\"Allgemein\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/blog.zhaw.ch\/high-performance\/2018\/12\/21\/machine-learning-on-cortex-m4-using-keras-and-arm-cmsis-nn\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.zhaw.ch\/high-performance\/2018\/12\/21\/machine-learning-on-cortex-m4-using-keras-and-arm-cmsis-nn\/\",\"url\":\"https:\/\/blog.zhaw.ch\/high-performance\/2018\/12\/21\/machine-learning-on-cortex-m4-using-keras-and-arm-cmsis-nn\/\",\"name\":\"Machine learning on Cortex-M4 using Keras and ARM-CMSIS-NN - Embedded High Performance Multimedia Blog\",\"isPartOf\":{\"@id\":\"https:\/\/blog.zhaw.ch\/high-performance\/#website\"},\"datePublished\":\"2018-12-21T13:08:35+00:00\",\"author\":{\"@id\":\"https:\/\/blog.zhaw.ch\/high-performance\/#\/schema\/person\/e1a77329f74257615afa71bc883106c9\"},\"breadcrumb\":{\"@id\":\"https:\/\/blog.zhaw.ch\/high-performance\/2018\/12\/21\/machine-learning-on-cortex-m4-using-keras-and-arm-cmsis-nn\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.zhaw.ch\/high-performance\/2018\/12\/21\/machine-learning-on-cortex-m4-using-keras-and-arm-cmsis-nn\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.zhaw.ch\/high-performance\/2018\/12\/21\/machine-learning-on-cortex-m4-using-keras-and-arm-cmsis-nn\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Startseite\",\"item\":\"https:\/\/blog.zhaw.ch\/high-performance\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Machine learning on Cortex-M4 using Keras and ARM-CMSIS-NN\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.zhaw.ch\/high-performance\/#website\",\"url\":\"https:\/\/blog.zhaw.ch\/high-performance\/\",\"name\":\"Embedded High Performance Multimedia Blog\",\"description\":\"A Blog of the ZHAW Zurich University of Applied Sciences\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.zhaw.ch\/high-performance\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.zhaw.ch\/high-performance\/#\/schema\/person\/e1a77329f74257615afa71bc883106c9\",\"name\":\"rosn\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/eec853590b797a7cdaea9a010f9e4424a21362148edf1b8d8d51fc8c5bced337?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/eec853590b797a7cdaea9a010f9e4424a21362148edf1b8d8d51fc8c5bced337?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/eec853590b797a7cdaea9a010f9e4424a21362148edf1b8d8d51fc8c5bced337?s=96&d=mm&r=g\",\"caption\":\"rosn\"},\"url\":\"https:\/\/blog.zhaw.ch\/high-performance\/author\/rosn\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Machine learning on Cortex-M4 using Keras and ARM-CMSIS-NN - Embedded High Performance Multimedia Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.zhaw.ch\/high-performance\/2018\/12\/21\/machine-learning-on-cortex-m4-using-keras-and-arm-cmsis-nn\/","og_locale":"en_GB","og_type":"article","og_title":"Machine learning on Cortex-M4 using Keras and ARM-CMSIS-NN","og_description":"We have developed a simple software&nbsp; to show how a custom keras model can be automatically translated into c-code.&nbsp;The generated c-code can, in combination with the ARM-CMSIS-NN functions,&nbsp;be used to run neural-net calculations in an efficient way on an embedded micro-controller such as the CORTEX-M4.&nbsp; The example&nbsp;software on GitHub&nbsp;has also firmware which runs on the [&hellip;]","og_url":"https:\/\/blog.zhaw.ch\/high-performance\/2018\/12\/21\/machine-learning-on-cortex-m4-using-keras-and-arm-cmsis-nn\/","og_site_name":"Embedded High Performance Multimedia Blog","article_published_time":"2018-12-21T13:08:35+00:00","author":"rosn","twitter_card":"summary_large_image","twitter_misc":{"Written by":"rosn","Estimated reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blog.zhaw.ch\/high-performance\/2018\/12\/21\/machine-learning-on-cortex-m4-using-keras-and-arm-cmsis-nn\/#article","isPartOf":{"@id":"https:\/\/blog.zhaw.ch\/high-performance\/2018\/12\/21\/machine-learning-on-cortex-m4-using-keras-and-arm-cmsis-nn\/"},"author":{"name":"rosn","@id":"https:\/\/blog.zhaw.ch\/high-performance\/#\/schema\/person\/e1a77329f74257615afa71bc883106c9"},"headline":"Machine learning on Cortex-M4 using Keras and ARM-CMSIS-NN","datePublished":"2018-12-21T13:08:35+00:00","mainEntityOfPage":{"@id":"https:\/\/blog.zhaw.ch\/high-performance\/2018\/12\/21\/machine-learning-on-cortex-m4-using-keras-and-arm-cmsis-nn\/"},"wordCount":110,"commentCount":0,"articleSection":["Allgemein"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/blog.zhaw.ch\/high-performance\/2018\/12\/21\/machine-learning-on-cortex-m4-using-keras-and-arm-cmsis-nn\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/blog.zhaw.ch\/high-performance\/2018\/12\/21\/machine-learning-on-cortex-m4-using-keras-and-arm-cmsis-nn\/","url":"https:\/\/blog.zhaw.ch\/high-performance\/2018\/12\/21\/machine-learning-on-cortex-m4-using-keras-and-arm-cmsis-nn\/","name":"Machine learning on Cortex-M4 using Keras and ARM-CMSIS-NN - Embedded High Performance Multimedia Blog","isPartOf":{"@id":"https:\/\/blog.zhaw.ch\/high-performance\/#website"},"datePublished":"2018-12-21T13:08:35+00:00","author":{"@id":"https:\/\/blog.zhaw.ch\/high-performance\/#\/schema\/person\/e1a77329f74257615afa71bc883106c9"},"breadcrumb":{"@id":"https:\/\/blog.zhaw.ch\/high-performance\/2018\/12\/21\/machine-learning-on-cortex-m4-using-keras-and-arm-cmsis-nn\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.zhaw.ch\/high-performance\/2018\/12\/21\/machine-learning-on-cortex-m4-using-keras-and-arm-cmsis-nn\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blog.zhaw.ch\/high-performance\/2018\/12\/21\/machine-learning-on-cortex-m4-using-keras-and-arm-cmsis-nn\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Startseite","item":"https:\/\/blog.zhaw.ch\/high-performance\/"},{"@type":"ListItem","position":2,"name":"Machine learning on Cortex-M4 using Keras and ARM-CMSIS-NN"}]},{"@type":"WebSite","@id":"https:\/\/blog.zhaw.ch\/high-performance\/#website","url":"https:\/\/blog.zhaw.ch\/high-performance\/","name":"Embedded High Performance Multimedia Blog","description":"A Blog of the ZHAW Zurich University of Applied Sciences","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.zhaw.ch\/high-performance\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/blog.zhaw.ch\/high-performance\/#\/schema\/person\/e1a77329f74257615afa71bc883106c9","name":"rosn","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/eec853590b797a7cdaea9a010f9e4424a21362148edf1b8d8d51fc8c5bced337?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/eec853590b797a7cdaea9a010f9e4424a21362148edf1b8d8d51fc8c5bced337?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/eec853590b797a7cdaea9a010f9e4424a21362148edf1b8d8d51fc8c5bced337?s=96&d=mm&r=g","caption":"rosn"},"url":"https:\/\/blog.zhaw.ch\/high-performance\/author\/rosn\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.zhaw.ch\/high-performance\/wp-json\/wp\/v2\/posts\/152","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.zhaw.ch\/high-performance\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.zhaw.ch\/high-performance\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.zhaw.ch\/high-performance\/wp-json\/wp\/v2\/users\/270"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.zhaw.ch\/high-performance\/wp-json\/wp\/v2\/comments?post=152"}],"version-history":[{"count":1,"href":"https:\/\/blog.zhaw.ch\/high-performance\/wp-json\/wp\/v2\/posts\/152\/revisions"}],"predecessor-version":[{"id":153,"href":"https:\/\/blog.zhaw.ch\/high-performance\/wp-json\/wp\/v2\/posts\/152\/revisions\/153"}],"wp:attachment":[{"href":"https:\/\/blog.zhaw.ch\/high-performance\/wp-json\/wp\/v2\/media?parent=152"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.zhaw.ch\/high-performance\/wp-json\/wp\/v2\/categories?post=152"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.zhaw.ch\/high-performance\/wp-json\/wp\/v2\/tags?post=152"},{"taxonomy":"features","embeddable":true,"href":"https:\/\/blog.zhaw.ch\/high-performance\/wp-json\/wp\/v2\/features?post=152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}