</script><linkhref="https://cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css"rel="stylesheet"type="text/css"/><linkhref="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"rel="stylesheet"type="text/css"/><script>documenterBaseURL="."</script><scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.2.0/require.min.js"data-main="assets/documenter.js"></script><scriptsrc="siteinfo.js"></script><scriptsrc="../versions.js"></script><linkhref="assets/documenter.css"rel="stylesheet"type="text/css"/><linkhref="assets/flux.css"rel="stylesheet"type="text/css"/></head><body><navclass="toc"><h1>Flux</h1><selectid="version-selector"onChange="window.location.href=this.value"style="visibility: hidden"></select><formclass="search"id="search-form"action="search/"><inputid="search-query"name="q"type="text"placeholder="Search docs"/></form><ul><liclass="current"><aclass="toctext"href>Home</a><ulclass="internal"><li><aclass="toctext"href="#Installation-1">Installation</a></li><li><aclass="toctext"href="#Learning-Flux-1">Learning Flux</a></li></ul></li><li><spanclass="toctext">Building Models</span><ul><li><aclass="toctext"href="models/basics/">Basics</a></li><li><aclass="toctext"href="models/recurrence/">Recurrence</a></li><li><aclass="toctext"href="models/regularisation/">Regularisation</a></li><li><aclass="toctext"href="models/layers/">Model Reference</a></li></ul></li><li><spanclass="toctext">Training Models</span><ul><li><aclass="toctext"href="training/optimisers/">Optimisers</a></li><li><aclass="toctext"href="training/training/">Training</a></li></ul></li><li><aclass="toctext"href="data/onehot/">One-Hot Encoding</a></li><li><aclass="toctext"href="gpu/">GPU Support</a></li><li><aclass="toctext"href="saving/">Saving & Loading</a></li><li><aclass="toctext"href="performance/">Performance Tips</a></li><li><spanclass="toctext">Internals</span><ul><li><aclass="toctext"href="internals/tracker/">Backpropagation</a></li></ul></li><li><aclass="toctext"href="community/">Community</a></li></ul></nav><articleid="docs"><header><nav><ul><li><ahref>Home</a></li></ul><aclass="edit-page"href="https://github.com/FluxML/Flux.jl/blob/master/docs/src/index.md"><spanclass="fa"></span> Edit on GitHub</a></nav><hr/><divid="topbar"><span>Home</span><aclass="fa fa-bars"href="#"></a></div></header><h1><aclass="nav-anchor"id="Flux:-The-Julia-Machine-Learning-Library-1"href="#Flux:-The-Julia-Machine-Learning-Library-1">Flux: The Julia Machine Learning Library</a></h1><p>Flux is a library for machine learning. It comes "batteries-included" with many useful tools built in, but also lets you use the full power of the Julia language where you need it. We follow a few key principles:</p><ul><li><strong>Doing the obvious thing</strong>. Flux has relatively few explicit APIs for features like regularisation or embeddings. Instead, writing down the mathematical form will work – and be fast.</li><li><strong>You could have written Flux</strong>. All of it, from <ahref="https://github.com/FluxML/Flux.jl/blob/ec16a2c77dbf6ab8b92b0eecd11661be7a62feef/src/layers/recurrent.jl#L131">LSTMs</a> to <ahref="https://github.com/JuliaGPU/CuArrays.jl">GPU kernels</a>, is straightforward Julia code. When in doubt, it’s well worth looking at <ahref="https://github.com/FluxML/Flux.jl/">the source</a>. If you need something different, you can easily roll your own.</li><li><strong>Play nicely with others</strong>. Flux works well with Julia libraries from <ahref="https://github.com/JuliaComputing/JuliaDB.jl">data frames</a> and <ahref="https://github.com/JuliaImages/Images.jl">images</a> to <ahref="https://github.com/JuliaDiffEq/DifferentialEquations.jl">differential equation solvers</a>, so you can easily build