Skip to content

Commit

Permalink
build based on 377e74d
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Dec 5, 2023
1 parent 89bc0c6 commit 3174947
Show file tree
Hide file tree
Showing 33 changed files with 131 additions and 131 deletions.
2 changes: 1 addition & 1 deletion dev/data/mlutils/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -562,4 +562,4 @@
julia> zeros_like(x, Float64)
2×2 CuArray{Float64, 2, CUDA.Mem.DeviceBuffer}:
0.0 0.0
0.0 0.0</code></pre></div></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../../training/zygote/">« Gradients – Zygote.jl</a><a class="docs-footer-nextpage" href="../onehot/">OneHotArrays.jl »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Friday 1 December 2023 22:16">Friday 1 December 2023</span>. Using Julia version 1.9.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
0.0 0.0</code></pre></div></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../../training/zygote/">« Gradients – Zygote.jl</a><a class="docs-footer-nextpage" href="../onehot/">OneHotArrays.jl »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Tuesday 5 December 2023 15:24">Tuesday 5 December 2023</span>. Using Julia version 1.9.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
2 changes: 1 addition & 1 deletion dev/data/onehot/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@
3 6 15 3 9 3 12 3 6 15 3</code></pre></div></section></article><article class="docstring"><header><a class="docstring-binding" id="OneHotArrays.OneHotArray" href="#OneHotArrays.OneHotArray"><code>OneHotArrays.OneHotArray</code></a><span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">OneHotArray{T, N, M, I} &lt;: AbstractArray{Bool, M}
OneHotArray(indices, L)</code></pre><p>A one-hot <code>M</code>-dimensional array with <code>L</code> labels (i.e. <code>size(A, 1) == L</code> and <code>sum(A, dims=1) == 1</code>) stored as a compact <code>N == M-1</code>-dimensional array of indices.</p><p>Typically constructed by <a href="#OneHotArrays.onehot"><code>onehot</code></a> and <a href="#OneHotArrays.onehotbatch"><code>onehotbatch</code></a>. Parameter <code>I</code> is the type of the underlying storage, and <code>T</code> its eltype.</p></div></section></article><article class="docstring"><header><a class="docstring-binding" id="OneHotArrays.OneHotVector" href="#OneHotArrays.OneHotVector"><code>OneHotArrays.OneHotVector</code></a><span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">OneHotVector{T} = OneHotArray{T, 0, 1, T}
OneHotVector(indices, L)</code></pre><p>A one-hot vector with <code>L</code> labels (i.e. <code>length(A) == L</code> and <code>count(A) == 1</code>) typically constructed by <a href="#OneHotArrays.onehot"><code>onehot</code></a>. Stored efficiently as a single index of type <code>T</code>, usually <code>UInt32</code>.</p></div></section></article><article class="docstring"><header><a class="docstring-binding" id="OneHotArrays.OneHotMatrix" href="#OneHotArrays.OneHotMatrix"><code>OneHotArrays.OneHotMatrix</code></a><span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">OneHotMatrix{T, I} = OneHotArray{T, 1, 2, I}
OneHotMatrix(indices, L)</code></pre><p>A one-hot matrix (with <code>L</code> labels) typically constructed using <a href="#OneHotArrays.onehotbatch"><code>onehotbatch</code></a>. Stored efficiently as a vector of indices with type <code>I</code> and eltype <code>T</code>.</p></div></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../mlutils/">« Batching Data – MLUtils.jl</a><a class="docs-footer-nextpage" href="../../models/nnlib/">Low-level Operations – NNlib.jl »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Friday 1 December 2023 22:16">Friday 1 December 2023</span>. Using Julia version 1.9.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
OneHotMatrix(indices, L)</code></pre><p>A one-hot matrix (with <code>L</code> labels) typically constructed using <a href="#OneHotArrays.onehotbatch"><code>onehotbatch</code></a>. Stored efficiently as a vector of indices with type <code>I</code> and eltype <code>T</code>.</p></div></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../mlutils/">« Batching Data – MLUtils.jl</a><a class="docs-footer-nextpage" href="../../models/nnlib/">Low-level Operations – NNlib.jl »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Tuesday 5 December 2023 15:24">Tuesday 5 December 2023</span>. Using Julia version 1.9.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
6 changes: 3 additions & 3 deletions dev/destructure/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
L2 (generic function with 1 method)

julia&gt; L2(m2) isa Float32
true</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/FluxML/Flux.jl/blob/ed5a3b844bb5f607c96fcf8cb2037b08770d5279/src/utils.jl#L566-L608">source</a></section></article><h3 id="Save-and-Load"><a class="docs-heading-anchor" href="#Save-and-Load">Save and Load</a><a id="Save-and-Load-1"></a><a class="docs-heading-anchor-permalink" href="#Save-and-Load" title="Permalink"></a></h3><article class="docstring"><header><a class="docstring-binding" id="Flux.state" href="#Flux.state"><code>Flux.state</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">state(x)</code></pre><p>Return an object with the same nested structure as <code>x</code> according to <code>Functors.children</code>, but made only of basic containers (e.g. named tuples, tuples, arrays, and dictionaries).</p><p>Besides trainable and non-trainable arrays, the state will contain leaf nodes that are not arrays, such as numbers, symbols, strings, and nothing values. The leaf types that end up in the state could increase in the future.</p><p>This method is particularly useful for saving and loading models, since the state contain only simple data types that can be easily serialized.</p><p>The state can be passed to <a href="#Flux.loadmodel!"><code>loadmodel!</code></a> to restore the model.</p><p><strong>Examples</strong></p><p><strong>Copy the state into another model</strong></p><pre><code class="language-julia-repl hljs">julia&gt; m1 = Chain(Dense(1, 2, tanh; init=ones), Dense(2, 1; init=ones));
true</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/FluxML/Flux.jl/blob/377e74de79f8b09bc842db89515bc3f760e60040/src/utils.jl#L566-L608">source</a></section></article><h3 id="Save-and-Load"><a class="docs-heading-anchor" href="#Save-and-Load">Save and Load</a><a id="Save-and-Load-1"></a><a class="docs-heading-anchor-permalink" href="#Save-and-Load" title="Permalink"></a></h3><article class="docstring"><header><a class="docstring-binding" id="Flux.state" href="#Flux.state"><code>Flux.state</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">state(x)</code></pre><p>Return an object with the same nested structure as <code>x</code> according to <code>Functors.children</code>, but made only of basic containers (e.g. named tuples, tuples, arrays, and dictionaries).</p><p>Besides trainable and non-trainable arrays, the state will contain leaf nodes that are not arrays, such as numbers, symbols, strings, and nothing values. The leaf types that end up in the state could increase in the future.</p><p>This method is particularly useful for saving and loading models, since the state contain only simple data types that can be easily serialized.</p><p>The state can be passed to <a href="#Flux.loadmodel!"><code>loadmodel!</code></a> to restore the model.</p><p><strong>Examples</strong></p><p><strong>Copy the state into another model</strong></p><pre><code class="language-julia-repl hljs">julia&gt; m1 = Chain(Dense(1, 2, tanh; init=ones), Dense(2, 1; init=ones));

julia&gt; s = Flux.state(m1)
(layers = ((weight = [1.0; 1.0;;], bias = [0.0, 0.0], σ = ()), (weight = [1.0 1.0], bias = [0.0], σ = ())),)
Expand All @@ -95,7 +95,7 @@

julia&gt; JLD2.jldsave(&quot;checkpoint.jld2&quot;, model_state = s)

julia&gt; Flux.loadmodel!(m2, JLD2.load(&quot;checkpoint.jld2&quot;, &quot;model_state&quot;))</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/FluxML/Flux.jl/blob/ed5a3b844bb5f607c96fcf8cb2037b08770d5279/src/loading.jl#L112-L172">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Flux.loadmodel!" href="#Flux.loadmodel!"><code>Flux.loadmodel!</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">loadmodel!(dst, src)</code></pre><p>Copy all the parameters (trainable and non-trainable) from <code>src</code> into <code>dst</code>.</p><p>Recursively walks <code>dst</code> and <code>src</code> together using <a href="../models/functors/#Functors.children"><code>Functors.children</code></a>, and calling <code>copyto!</code> on parameter arrays or throwing an error when there is a mismatch. Non-array elements (such as activation functions) are not copied and need not match. Zero bias vectors and <code>bias=false</code> are considered equivalent (see extended help for more details).</p><p>See also <a href="#Flux.state"><code>Flux.state</code></a>.</p><p><strong>Examples</strong></p><pre><code class="language-julia hljs">julia&gt; dst = Chain(Dense(Flux.ones32(2, 5), Flux.ones32(2), tanh), Dense(2 =&gt; 1; bias = [1f0]))
julia&gt; Flux.loadmodel!(m2, JLD2.load(&quot;checkpoint.jld2&quot;, &quot;model_state&quot;))</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/FluxML/Flux.jl/blob/377e74de79f8b09bc842db89515bc3f760e60040/src/loading.jl#L112-L172">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Flux.loadmodel!" href="#Flux.loadmodel!"><code>Flux.loadmodel!</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">loadmodel!(dst, src)</code></pre><p>Copy all the parameters (trainable and non-trainable) from <code>src</code> into <code>dst</code>.</p><p>Recursively walks <code>dst</code> and <code>src</code> together using <a href="../models/functors/#Functors.children"><code>Functors.children</code></a>, and calling <code>copyto!</code> on parameter arrays or throwing an error when there is a mismatch. Non-array elements (such as activation functions) are not copied and need not match. Zero bias vectors and <code>bias=false</code> are considered equivalent (see extended help for more details).</p><p>See also <a href="#Flux.state"><code>Flux.state</code></a>.</p><p><strong>Examples</strong></p><pre><code class="language-julia hljs">julia&gt; dst = Chain(Dense(Flux.ones32(2, 5), Flux.ones32(2), tanh), Dense(2 =&gt; 1; bias = [1f0]))
Chain(
Dense(5 =&gt; 2, tanh), # 12 parameters
Dense(2 =&gt; 1), # 3 parameters
Expand All @@ -112,4 +112,4 @@
false

julia&gt; iszero(dst[2].bias)
true</code></pre><p><strong>Extended help</strong></p><p>Throws an error when:</p><ul><li><code>dst</code> and <code>src</code> do not share the same fields (at any level)</li><li>the sizes of leaf nodes are mismatched between <code>dst</code> and <code>src</code></li><li>copying non-array values to/from an array parameter (except inactive parameters described below)</li><li><code>dst</code> is a &quot;tied&quot; parameter (i.e. refers to another parameter) and loaded into multiple times with mismatched source values</li></ul><p>Inactive parameters can be encoded by using the boolean value <code>false</code> instead of an array. If <code>dst == false</code> and <code>src</code> is an all-zero array, no error will be raised (and no values copied); however, attempting to copy a non-zero array to an inactive parameter will throw an error. Likewise, copying a <code>src</code> value of <code>false</code> to any <code>dst</code> array is valid, but copying a <code>src</code> value of <code>true</code> will error.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/FluxML/Flux.jl/blob/ed5a3b844bb5f607c96fcf8cb2037b08770d5279/src/loading.jl#L39-L89">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../outputsize/">« Shape Inference</a><a class="docs-footer-nextpage" href="../training/callbacks/">Callback Helpers »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Friday 1 December 2023 22:16">Friday 1 December 2023</span>. Using Julia version 1.9.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
true</code></pre><p><strong>Extended help</strong></p><p>Throws an error when:</p><ul><li><code>dst</code> and <code>src</code> do not share the same fields (at any level)</li><li>the sizes of leaf nodes are mismatched between <code>dst</code> and <code>src</code></li><li>copying non-array values to/from an array parameter (except inactive parameters described below)</li><li><code>dst</code> is a &quot;tied&quot; parameter (i.e. refers to another parameter) and loaded into multiple times with mismatched source values</li></ul><p>Inactive parameters can be encoded by using the boolean value <code>false</code> instead of an array. If <code>dst == false</code> and <code>src</code> is an all-zero array, no error will be raised (and no values copied); however, attempting to copy a non-zero array to an inactive parameter will throw an error. Likewise, copying a <code>src</code> value of <code>false</code> to any <code>dst</code> array is valid, but copying a <code>src</code> value of <code>true</code> will error.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/FluxML/Flux.jl/blob/377e74de79f8b09bc842db89515bc3f760e60040/src/loading.jl#L39-L89">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../outputsize/">« Shape Inference</a><a class="docs-footer-nextpage" href="../training/callbacks/">Callback Helpers »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Tuesday 5 December 2023 15:24">Tuesday 5 December 2023</span>. Using Julia version 1.9.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
2 changes: 1 addition & 1 deletion dev/ecosystem/index.html

Large diffs are not rendered by default.

Loading

0 comments on commit 3174947

Please sign in to comment.