-([0.652543 … 0.683588], [1.0, 1.0])</code></pre><p>Here <code>grads</code> is a dictionary-like object, whose keys are the same parameters we indicated in <code>Params</code>. (In fact it wraps a dictionary using <code>objectid(W)</code> as keys, which does not change if the values in <code>W</code> are mutated).</p><p>This implicit style is the one presently used by <a href="https://github.com/FluxML/Flux.jl">Flux.jl</a>, a closely related machine learning library. It uses structs like <code>Linear</code> above to define layers, and the function <code>Flux.params(model)</code> returns a <code>Params</code> object containing all the parameters of all layers. See <a href="https://fluxml.ai/Flux.jl/stable/models/basics/">its documentation</a> for more details. When using Zygote for most other purposes, however, the explicit style is usually preferred.</p></article><nav class="docs-footer"><a class="docs-footer-nextpage" href="limitations/">Limitations »</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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.15.0 on <span class="colophon-date" title="Sunday 26 October 2025 17:30">Sunday 26 October 2025</span>. Using Julia version 1.12.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
0 commit comments