{"id":13485,"date":"2020-09-18T07:49:52","date_gmt":"2020-09-18T14:49:52","guid":{"rendered":"http:\/\/jnack.com\/blog\/?p=13485"},"modified":"2020-09-17T09:55:34","modified_gmt":"2020-09-17T16:55:34","slug":"tensorflow-js-brings-faster-ml-to-your-browser","status":"publish","type":"post","link":"http:\/\/jnack.com\/blog\/2020\/09\/18\/tensorflow-js-brings-faster-ml-to-your-browser\/","title":{"rendered":"TensorFlow.js brings faster ML to your browser"},"content":{"rendered":"\n<p>Speaking of making machine learning-powered experiences <a href=\"http:\/\/jnack.com\/blog\/2020\/09\/17\/google-meet-adds-background-blur-with-a-twist\/\">fast &amp; ubiquitous<\/a> via the Web, check out <a href=\"https:\/\/blog.tensorflow.org\/2020\/09\/supercharging-tensorflowjs-webassembly.html\">the latest work from our friends on TensorFlow.js<\/a>:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\"><p>In March\u00a0<a href=\"https:\/\/blog.tensorflow.org\/2020\/03\/introducing-webassembly-backend-for-tensorflow-js.html\">we introduced<\/a>\u00a0a new WebAssembly (Wasm) accelerated backend for TensorFlow.js (scroll further down to learn more about Wasm and why this is important). Today we are excited to announce a major performance update: as of TensorFlow.js version 2.3.0, our Wasm backend has become up to 10X faster by leveraging\u00a0<a href=\"https:\/\/github.com\/WebAssembly\/simd\">SIMD (vector) instructions<\/a>\u00a0and\u00a0<a href=\"https:\/\/github.com\/WebAssembly\/threads\">multithreading<\/a>\u00a0via\u00a0<a href=\"https:\/\/github.com\/google\/XNNPACK\">XNNPACK<\/a>, a highly optimized library of neural network operators.<\/p><\/blockquote>\n\n\n\n<p>You can see the performance improvements for yourself:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\"><p>Check out this demo of our BlazeFace model, which has been updated to use the new Wasm backend:\u00a0<a href=\"https:\/\/tfjs-wasm-simd-demo.netlify.app\/\">https:\/\/tfjs-wasm-simd-demo.netlify.app\/<\/a>\u00a0To compare against the unoptimized binary, try\u00a0<a href=\"https:\/\/storage.googleapis.com\/tfjs-models\/demos\/blazeface\/index.html?tfjsflags=WASM_HAS_MULTITHREAD_SUPPORT:false,WASM_HAS_SIMD_SUPPORT:false\">this version of the demo<\/a>, which manually turns off SIMD and multithreading support.<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Speaking of making machine learning-powered experiences fast &amp; ubiquitous via the Web, check out the latest work from our friends on TensorFlow.js: In March\u00a0we introduced\u00a0a new WebAssembly (Wasm) accelerated backend for TensorFlow.js (scroll further down to learn more about Wasm and why this is important). Today we are excited to announce a major performance update: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[13],"tags":[],"_links":{"self":[{"href":"http:\/\/jnack.com\/blog\/wp-json\/wp\/v2\/posts\/13485"}],"collection":[{"href":"http:\/\/jnack.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/jnack.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/jnack.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/jnack.com\/blog\/wp-json\/wp\/v2\/comments?post=13485"}],"version-history":[{"count":1,"href":"http:\/\/jnack.com\/blog\/wp-json\/wp\/v2\/posts\/13485\/revisions"}],"predecessor-version":[{"id":13486,"href":"http:\/\/jnack.com\/blog\/wp-json\/wp\/v2\/posts\/13485\/revisions\/13486"}],"wp:attachment":[{"href":"http:\/\/jnack.com\/blog\/wp-json\/wp\/v2\/media?parent=13485"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/jnack.com\/blog\/wp-json\/wp\/v2\/categories?post=13485"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/jnack.com\/blog\/wp-json\/wp\/v2\/tags?post=13485"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}