</script><linkhref="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/fontawesome.min.css"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/solid.min.css"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/brands.min.css"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css"rel="stylesheet"type="text/css"/><script>documenterBaseURL=".."</script><scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js"data-main="../assets/documenter.js"></script><scriptsrc="../siteinfo.js"></script><scriptsrc="../../versions.js"></script><linkhref="../assets/flux.css"rel="stylesheet"type="text/css"/><linkclass="docs-theme-link"rel="stylesheet"type="text/css"href="../assets/themes/documenter-dark.css"data-theme-name="documenter-dark"/><linkclass="docs-theme-link"rel="stylesheet"type="text/css"href="../assets/themes/documenter-light.css"data-theme-name="documenter-light"data-theme-primary/><scriptsrc="../assets/themeswap.js"></script></head><body><divid="documenter"><navclass="docs-sidebar"><divclass="docs-package-name"><spanclass="docs-autofit">Flux</span></div><formclass="docs-search"action="../search/"><inputclass="docs-search-query"id="documenter-search-query"name="q"type="text"placeholder="Search docs"/></form><ulclass="docs-menu"><li><aclass="tocitem"href="../">Home</a></li><li><spanclass="tocitem">Building Models</span><ul><li><aclass="tocitem"href="../models/basics/">Basics</a></li><li><aclass="tocitem"href="../models/recurrence/">Recurrence</a></li><li><aclass="tocitem"href="../models/regularisation/">Regularisation</a></li><li><aclass="tocitem"href="../models/layers/">Model Reference</a></li><li><aclass="tocitem"href="../models/advanced/">Advanced Model Building</a></li><li><aclass="tocitem"href="../models/nnlib/">NNlib</a></li></ul></li><li><spanclass="tocitem">Handling Data</span><ul><li><aclass="tocitem"href="../data/onehot/">One-Hot Encoding</a></li><li><aclass="tocitem"href="../data/dataloader/">DataLoader</a></li></ul></li><li><spanclass="tocitem">Training Models</span><ul><li><aclass="tocitem"href="../training/optimisers/">Optimisers</a></li><li><aclass="tocitem"href="../training/training/">Training</a></li></ul></li><li><aclass="tocitem"href="../gpu/">GPU Support</a></li><li><aclass="tocitem"href="../saving/">Saving & Loading</a></li><li><aclass="tocitem"href="../ecosystem/">The Julia Ecosystem</a></li><li><aclass="tocitem"href="../utilities/">Utility Functions</a></li><li><aclass="tocitem"href="../performance/">Performance Tips</a></li><liclass="is-active"><aclass="tocitem"href>Datasets</a></li><li><aclass="tocitem"href="../community/">Community</a></li></ul><divclass="docs-version-selector field has-addons"><divclass="control"><spanclass="docs-label button is-static is-size-7">Version</span></div><divclass="docs-selector control is-expanded"><divclass="select is-fullwidth is-size-7"><selectid="documenter-version-selector"></select></div></div></div></nav><divclass="docs-main"><headerclass="docs-navbar"><navclass="breadcrumb"><ulclass="is-hidden-mobile"><liclass="is-active"><ahref>Datasets</a></li></ul><ulclass="is-hidden-tablet"><liclass="is-active"><ahref>Datasets</a></li></ul></nav><divclass="docs-right"><aclass="docs-edit-link"href="https://github.com/FluxML/Flux.jl/blob/master/docs/src/datasets.md"title="Edit on GitHub"><spanclass="docs-icon fab"></span><spanclass="docs-label is-hidden-touch">Edit on GitHub</span></a><aclass="docs-settings-button fas fa-cog"id="documenter-settings-button"href="#"title="Settings"></a><aclass="docs-sidebar-button fa fa-bars is-hidden-desktop"id="documenter-sidebar-button"href="#"></a></div></header><articleclass="content"id="documenter-page"><h1id="Datasets-1">
0.2</code></pre></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/FluxML/Flux.jl/blob/0b10f1a8dff3d02cccd81206f4f187c5731db2df/src/data/iris.jl#L51-L71">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="Flux.Data.Iris.labels-Tuple{}"href="#Flux.Data.Iris.labels-Tuple{}"><code>Flux.Data.Iris.labels</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">labels()</code></pre><p>Get the labels of the iris dataset, a 150 element array of strings listing the species of each example.</p><pre><codeclass="language-julia-repl">julia> labels = Flux.Data.Iris.labels();
images(:test)</code></pre><p>Load the MNIST images.</p><p>Each image is a 28×28 array of <code>Gray</code> colour values (see <ahref="https://github.com/JuliaGraphics/Colors.jl">Colors.jl</a>).</p><p>Return the 60,000 training images by default; pass <code>:test</code> to retrieve the 10,000 test images.</p></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/FluxML/Flux.jl/blob/0b10f1a8dff3d02cccd81206f4f187c5731db2df/src/data/mnist.jl#L80-L91">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="Flux.Data.MNIST.labels-Tuple{}"href="#Flux.Data.MNIST.labels-Tuple{}"><code>Flux.Data.MNIST.labels</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">labels()
labels(:test)</code></pre><p>Load the labels corresponding to each of the images returned from <ahref="#Flux.Data.MNIST.images-Tuple{}"><code>images()</code></a>. Each label is a number from 0-9.</p><p>Return the 60,000 training labels by default; pass <code>:test</code> to retrieve the 10,000 test labels.</p></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/FluxML/Flux.jl/blob/0b10f1a8dff3d02cccd81206f4f187c5731db2df/src/data/mnist.jl#L99-L108">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="Flux.Data.FashionMNIST.images-Tuple{}"href="#Flux.Data.FashionMNIST.images-Tuple{}"><code>Flux.Data.FashionMNIST.images</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">images()
images(:test)</code></pre><p>Load the Fashion-MNIST images.</p><p>Each image is a 28×28 array of <code>Gray</code> colour values (see <ahref="https://github.com/JuliaGraphics/Colors.jl">Colors.jl</a>).</p><p>Return the 60,000 training images by default; pass <code>:test</code> to retrieve the 10,000 test images.</p></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/FluxML/Flux.jl/blob/0b10f1a8dff3d02cccd81206f4f187c5731db2df/src/data/fashion-mnist.jl#L30-L41">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="Flux.Data.FashionMNIST.labels-Tuple{}"href="#Flux.Data.FashionMNIST.labels-Tuple{}"><code>Flux.Data.FashionMNIST.labels</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">labels()
labels(:test)</code></pre><p>Load the labels corresponding to each of the images returned from <ahref="#Flux.Data.FashionMNIST.images-Tuple{}"><code>images()</code></a>. Each label is a number from 0-9.</p><p>Return the 60,000 training labels by default; pass <code>:test</code> to retrieve the 10,000 test labels.</p></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/FluxML/Flux.jl/blob/0b10f1a8dff3d02cccd81206f4f187c5731db2df/src/data/fashion-mnist.jl#L49-L58">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="Flux.Data.CMUDict.phones-Tuple{}"href="#Flux.Data.CMUDict.phones-Tuple{}"><code>Flux.Data.CMUDict.phones</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">phones()</code></pre><p>Return a <code>Vector</code> containing the phones used in the CMU Pronouncing Dictionary.</p></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/FluxML/Flux.jl/blob/0b10f1a8dff3d02cccd81206f4f187c5731db2df/src/data/cmudict.jl#L27-L31">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="Flux.Data.CMUDict.symbols-Tuple{}"href="#Flux.Data.CMUDict.symbols-Tuple{}"><code>Flux.Data.CMUDict.symbols</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">symbols()</code></pre><p>Return a <code>Vector</code> containing the symbols used in the CMU Pronouncing Dictionary. A symbol is a phone with optional auxiliary symbols, indicating for example the amount of stress on the phone.</p></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/FluxML/Flux.jl/blob/0b10f1a8dff3d02cccd81206f4f187c5731db2df/src/data/cmudict.jl#L38-L44">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="Flux.Data.CMUDict.rawdict-Tuple{}"href="#Flux.Data.CMUDict.rawdict-Tuple{}"><code>Flux.Data.CMUDict.rawdict</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">rawdict()</code></pre><p>Return the unfiltered CMU Pronouncing Dictionary.</p></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/FluxML/Flux.jl/blob/0b10f1a8dff3d02cccd81206f4f187c5731db2df/src/data/cmudict.jl#L51-L55">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="Flux.Data.CMUDict.cmudict-Tuple{}"href="#Flux.Data.CMUDict.cmudict-Tuple{}"><code>Flux.Data.CMUDict.cmudict</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">cmudict()</code></pre><p>Return a filtered CMU Pronouncing Dictionary.</p><p>It is filtered so each word contains only ASCII characters and a combination of word characters (as determined by the regex engine using <code>\w</code>), '-' and '.'.</p></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/FluxML/Flux.jl/blob/0b10f1a8dff3d02cccd81206f4f187c5731db2df/src/data/cmudict.jl#L64-L71">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="Flux.Data.Sentiment.train-Tuple{}"href="#Flux.Data.Sentiment.train-Tuple{}"><code>Flux.Data.Sentiment.train</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">train()</code></pre><p>Return the train split of the Stanford Sentiment Treebank. The data is in <ahref="https://en.wikipedia.org/wiki/Treebank">treebank</a> format.</p></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/FluxML/Flux.jl/blob/0b10f1a8dff3d02cccd81206f4f187c5731db2df/src/data/sentiment.jl#L43-L48">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="Flux.Data.Sentiment.test-Tuple{}"href="#Flux.Data.Sentiment.test-Tuple{}"><code>Flux.Data.Sentiment.test</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codecl