{"title":"dubs\u00b7tech","generator":"Jekyll","link":[{"@attributes":{"rel":"self","type":"application\/atom+xml","href":"https:\/\/www.dubs.tech\/feed.xml"}},{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/www.dubs.tech"}}],"updated":"2020-11-30T18:35:18+01:00","id":"https:\/\/www.dubs.tech\/","author":{"name":"Paul Dubs","uri":"https:\/\/www.dubs.tech\/","email":"paul.dubs@gmail.com"},"entry":[{"title":{"@attributes":{"type":"html"}},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/www.dubs.tech\/guides\/quickstart-with-dl4j\/"}},"id":"https:\/\/www.dubs.tech\/guides\/quickstart-with-dl4j","published":"2020-11-30T17:29:27+01:00","updated":"2020-11-30T17:29:27+01:00","author":{"name":"Paul Dubs","uri":"https:\/\/www.dubs.tech","email":"paul.dubs@gmail.com"},"content":"\n    <p>Deep learning, i.e. the use of deep, multi-layer neural networks, is the major driver of the current machine learning boom. From great leaps in quality in automatic translation, over autonomous driving, to beating grandmasters in the game Go, this technique has made a lot of headlines.<\/p>\n\n<p>Deeplearning4J, also called DL4J, is a Java library for Deep Learning. But, it also a whole family of other libraries that simplify the use of deep learning models with Java. As an alternative to the many Python based frameworks, DL4J offers a way to easily bring Deep Learning into existing enterprise environments.<\/p>\n\n<p>This blog post shows how to get started with DL4J in no time. By using an example where the goal is to predict whether a customer will leave his bank, each step of a typical workflow is considered. In order to focus on the individual steps, only excerpts of the code currently being discussed are shown. Imports and other Java boilerplate are left out, but the complete code including training data can be found at <a href=\"https:\/\/github.com\/treo\/quickstart-with-dl4j\">https:\/\/github.com\/treo\/quickstart-with-dl4j<\/a>.<\/p>\n\n\n    <p><a href=\"https:\/\/www.dubs.tech\/guides\/quickstart-with-dl4j\/\">Quickstart with Deeplearning4J<\/a> was originally published by Paul Dubs at <a href=\"https:\/\/www.dubs.tech\">dubs\u00b7tech<\/a> on November 30, 2020.<\/p>\n  "},{"title":{"@attributes":{"type":"html"}},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/www.dubs.tech\/blog\/benchmarking-nd4j-and-neanderthal-2\/"}},"id":"https:\/\/www.dubs.tech\/blog\/benchmarking-nd4j-and-neanderthal-2","published":"2018-06-29T12:12:55+02:00","updated":"2018-06-29T12:12:55+02:00","author":{"name":"Paul Dubs","uri":"https:\/\/www.dubs.tech","email":"paul.dubs@gmail.com"},"content":"\n    <p>Dragan Djuric, the creator of Neanderthal, has conducted <a href=\"https:\/\/dragan.rocks\/articles\/18\/Neanderthal-vs-ND4J-vol2\">another series of benchmarks comparing ND4J and Neanderthal<\/a>. This time the operation under test is a chain of matrix multiplications.<\/p>\n\n<p>He claims that in one of the benchmarks Neanderthal is 1000 times faster. This piqued my interest again since those kinds of differences don\u2019t magically show up \u2013 especially not in a library as widely used as ND4J.<\/p>\n\n<p>In this post I investigate the source of this difference, show why it happens and what to do about it as a user of the library.<\/p>\n\n<p>This is a follow up post to <a href=\"https:\/\/www.dubs.tech\/blog\/benchmarking-nd4j-and-neanderthal\/\">Benchmarking ND4J and Neanderthal<\/a>, so for some more context read that post as well.<\/p>\n\n\n    <p><a href=\"https:\/\/www.dubs.tech\/blog\/benchmarking-nd4j-and-neanderthal-2\/\">Benchmarking ND4J and Neanderthal \u2013 Part 2<\/a> was originally published by Paul Dubs at <a href=\"https:\/\/www.dubs.tech\">dubs\u00b7tech<\/a> on June 29, 2018.<\/p>\n  "},{"title":{"@attributes":{"type":"html"}},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/www.dubs.tech\/blog\/benchmarking-nd4j-and-neanderthal\/"}},"id":"https:\/\/www.dubs.tech\/blog\/benchmarking-nd4j-and-neanderthal","published":"2018-06-26T13:17:10+02:00","updated":"2018-06-26T13:17:10+02:00","author":{"name":"Paul Dubs","uri":"https:\/\/www.dubs.tech","email":"paul.dubs@gmail.com"},"content":"\n    <p><a href=\"https:\/\/nd4j.org\/\">ND4J<\/a> and <a href=\"https:\/\/neanderthal.uncomplicate.org\/\">Neanderthal<\/a> are both libraries for fast matrix math on the JVM. ND4J targets Java users, while Neanderthal is aimed at Clojure users. Due to Clojure\u2019s excellent Java Interop, it is quite easy to use ND4J in Clojure as well \u2014 even though it doesn\u2019t provide an idiomatic Clojure API out of the box.<\/p>\n\n<p>Dragan Djuric, the creator of Neanderthal, has recently <a href=\"https:\/\/dragan.rocks\/articles\/18\/Neanderthal-vs-ND4J-vol1\">conducted a micro-benchmark of both ND4J and Neanderthal<\/a>. The operation under test is matrix multiplication, in particular, calling GEMM from <a href=\"https:\/\/software.intel.com\/en-us\/mkl\">Intel\u2019s MKL<\/a> library. The results have been quite unexpected, since both libraries shouldn\u2019t do that much at that point, they basically pass on the call to MKL.<\/p>\n\n<p>When the results had shown that Neanderthal is 24 times faster with the smallest input of a 4x4 matrix, and still 20% faster at 4096x4096, it made me curious to what is going on. Especially since his ND4J code is based on <a href=\"https:\/\/github.com\/treo\/benchmarking_nd4j\/blob\/master\/src\/main\/java\/com\/example\/neanderthal\/NeanderthalComparison_2x2.java\">my original benchmarks<\/a>.<\/p>\n\n<p>When I originally compared ND4J and Neanderthal matrix multiplication speeds, the results left me wondering, since ND4J was slower at small sizes, yet faster at larger sizes. For this reason I never actually published any numbers. I originally based my comparison on <a href=\"https:\/\/github.com\/uncomplicate\/neanderthal\/blob\/1fe9d82ecd5d4ee4d7b19d9dbf8105ede9b5e83b\/examples\/benchmarks\/src\/benchmarks\/core.clj\">Dragan\u2019s benchmark code<\/a>, but I didn\u2019t notice that doubles were used there instead of floats. His new benchmark has cleared this confusion, and I\u2019m glad that Dragan has shared both code and results.<\/p>\n\n<p>In this post I try to validate Dragan\u2019s results, show the detail that changes the numbers considerably, and rerun the benchmark after some additional optimizations have been added to ND4J.<\/p>\n\n\n    <p><a href=\"https:\/\/www.dubs.tech\/blog\/benchmarking-nd4j-and-neanderthal\/\">Benchmarking ND4J and Neanderthal<\/a> was originally published by Paul Dubs at <a href=\"https:\/\/www.dubs.tech\">dubs\u00b7tech<\/a> on June 26, 2018.<\/p>\n  "},{"title":{"@attributes":{"type":"html"}},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/www.dubs.tech\/blog\/game-of-life-apl-nd4j-samediff\/"}},"id":"https:\/\/www.dubs.tech\/blog\/game-of-life-apl-nd4j-samediff","published":"2018-02-23T09:28:40+01:00","updated":"2018-02-23T09:28:40+01:00","author":{"name":"Paul Dubs","uri":"https:\/\/www.dubs.tech","email":"paul.dubs@gmail.com"},"content":"\n    <p>Conway\u2019s Game of Life is a simple simulation that works on a two-dimensional plane. It has just a few very simple rules:<\/p>\n\n<ul>\n  <li>An empty cell that has exactly 3 neighbors will be populated in the next timestep<\/li>\n  <li>A populated cell requires either 2 or 3 neighbors to stay populated, i.e. it will be unpopulated in the next timestep for any other case.<\/li>\n<\/ul>\n\n<p>There are a lot of different ways to implement those rules. This post first looks at a solution in a quite unusual language, namely APL, before showing how to do the same thing using the Java tensor math library ND4J and its upcoming graph variant SameDiff.<\/p>\n\n\n    <p><a href=\"https:\/\/www.dubs.tech\/blog\/game-of-life-apl-nd4j-samediff\/\">Implementing Conway\u2019s Game of Life with Tensor Math<\/a> was originally published by Paul Dubs at <a href=\"https:\/\/www.dubs.tech\">dubs\u00b7tech<\/a> on February 23, 2018.<\/p>\n  "},{"title":{"@attributes":{"type":"html"}},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/www.dubs.tech\/guides\/maven-essentials\/"}},"id":"https:\/\/www.dubs.tech\/guides\/maven-essentials","published":"2018-02-05T10:35:26+01:00","updated":"2018-02-05T10:35:26+01:00","author":{"name":"Paul Dubs","uri":"https:\/\/www.dubs.tech","email":"paul.dubs@gmail.com"},"content":"\n    <p>This guide will explain the essentials you will need to get productive with Maven immediately. It is written with a complete beginner in mind. You should read this, if you don\u2019t have any experience with Java package or dependency management beyond simply putting <code class=\"highlighter-rouge\">.jar<\/code> files on your class path.<\/p>\n\n<p>You might have been looking to use a library, and just couldn\u2019t find the <code class=\"highlighter-rouge\">.jar<\/code> file for it, or you\u2019ve been told to \u201cjust use Maven.\u201d Maybe you just switched over to Java from a different programming language, and you want to know how dependency management works.<\/p>\n\n\n    <p><a href=\"https:\/\/www.dubs.tech\/guides\/maven-essentials\/\">Maven: Essentials<\/a> was originally published by Paul Dubs at <a href=\"https:\/\/www.dubs.tech\">dubs\u00b7tech<\/a> on February 05, 2018.<\/p>\n  "}]}