-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Documenter.jl
committed
Nov 14, 2024
0 parents
commit 80fe3e2
Showing
1,050 changed files
with
159,361 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 Kyle Daruwalla | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# This file is machine-generated - editing it directly is not advised | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name = "ParameterSchedulers" | ||
uuid = "d7d3b36b-41b8-4d0d-a2bf-768c6151755e" | ||
authors = ["Kyle Daruwalla"] | ||
version = "0.1.0" | ||
|
||
[compat] | ||
julia = "1.1" | ||
|
||
[extras] | ||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
|
||
[publish] | ||
title = "ParameterSchedulers.jl" | ||
|
||
[targets] | ||
test = ["Test"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,253 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="generator" content="Publish.jl" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<meta name="keywords" content="" /> | ||
<title>ParameterSchedulers.jl</title> | ||
<link rel="stylesheet" href="normalize.css" /> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" /> | ||
<link rel="stylesheet" href="tabulator_simple.min.css" /> | ||
<link rel="stylesheet" href="publish.css" /> | ||
<link rel="stylesheet" href="default.min.css" /> | ||
<link rel="stylesheet" href="custom.css" /> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js"></script> | ||
<script src="versions.js"></script> | ||
<script src="lunr.js"></script> | ||
<script src="highlight.min.js"></script> | ||
<script src="tabulator.min.js"></script> | ||
<script src="julia.min.js"></script> | ||
<script src="julia-repl.min.js"></script> | ||
<script src="publish.js"></script> | ||
|
||
</head> | ||
<body> | ||
<main id="page"> | ||
<div class="menu"> | ||
<div id="projectname">ParameterSchedulers.jl</div> | ||
<input id="search-input" placeholder="Search"> | ||
<select id="version-selector"></select> | ||
<svg id="menu-toggler" title="Contents" onclick="toggleIndexPage();" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2 6C2 5.44772 2.44772 5 3 5H21C21.5523 5 22 5.44772 22 6C22 6.55228 21.5523 7 21 7H3C2.44772 7 2 6.55228 2 6Z" fill="currentColor" /><path d="M2 12.0322C2 11.4799 2.44772 11.0322 3 11.0322H21C21.5523 11.0322 22 11.4799 22 12.0322C22 12.5845 21.5523 13.0322 21 13.0322H3C2.44772 13.0322 2 12.5845 2 12.0322Z" fill="currentColor" /><path d="M3 17.0645C2.44772 17.0645 2 17.5122 2 18.0645C2 18.6167 2.44772 19.0645 3 19.0645H21C21.5523 19.0645 22 18.6167 22 18.0645C22 17.5122 21.5523 17.0645 21 17.0645H3Z" fill="currentColor" /></svg> | ||
</div> | ||
<div id="toc"><p><a href="README.html">Introduction</a></p> | ||
<h1 id="tutorials"><a href="#tutorials" class="anchor"></a>Tutorials</h1> | ||
<ul> | ||
<li><a href="docs/tutorials/getting-started.html">Getting started</a></li> | ||
<li><a href="docs/tutorials/basic-schedules.html">Basic schedules</a></li> | ||
<li><a href="docs/tutorials/optimizers.html">Optimizers</a></li> | ||
<li><a href="docs/tutorials/complex-schedules.html">Complex schedules</a></li> | ||
</ul> | ||
<h1 id="interfaces"><a href="#interfaces" class="anchor"></a>Interfaces</h1> | ||
<ul> | ||
<li><a href="docs/interfaces/generic.html">Generic</a></li> | ||
<li><a href="docs/interfaces/decay.html">Decay</a></li> | ||
<li><a href="docs/interfaces/cyclic.html">Cyclic</a></li> | ||
</ul> | ||
<hr /> | ||
<p><a href="docstrings.html">API Reference</a></p> | ||
</div> | ||
<article id="content"><h1 id="parameterschedulers"><a href="#parameterschedulers" class="anchor"></a>ParameterSchedulers</h1> | ||
<p><a href="https://darsnack.github.io/ParameterSchedulers.jl/dev"><img src="https://img.shields.io/badge/docs-dev-blue.svg" alt="Dev" /></a> | ||
<a href="https://github.com/darsnack/ParameterSchedulers.jl/actions"><img src="https://github.com/darsnack/ParameterSchedulers.jl/workflows/CI/badge.svg" alt="Build Status" /></a></p> | ||
<p>ParameterSchedulers.jl provides common machine learning (ML) schedulers for hyper-parameters. Though this package is framework agnostic, a convenient interface for pairing schedules with <a href="https://github.com/FluxML/Flux.jl">Flux.jl</a> optimizers is available. Using this package with Flux is as simple as:</p> | ||
<pre><code class="language-julia">using Flux, ParameterSchedulers | ||
|
||
opt = Exp(Momentum(); λ = 1e-2, γ = 0.8) | ||
</code></pre> | ||
<div class="admonition danger"><p class="admonition-title">Danger</p> | ||
<p>Currently, we are porting <code>ScheduledOptim</code> to Flux.jl. Until that is complete, you will need to manually copy the code in <code>src/optimizers.jl</code>.</p> | ||
</div> | ||
<h2 id="available-schedules"><a href="#available-schedules" class="anchor"></a>Available Schedules</h2> | ||
<p>This is a table of the common schedules implemented, but ParameterSchedulers provides utilities for creating more exotic schedules as well. You can read <a href="https://arxiv.org/abs/1908.06477">this paper</a> for more information on the schedules below.</p> | ||
<table> | ||
<thead> | ||
<tr> | ||
<th>Schedule</th> | ||
<th>Description</th> | ||
<th>Type</th> | ||
<th>Example</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr><td> | ||
<p><a href="docstrings/ParameterSchedulers.Step.html" title="`Step`"><code>Step(;λ, γ, step_sizes)</code></a></p> | ||
</td> | ||
<td> | ||
<p>Exponential decay by <code>γ</code> every step in <code>step_sizes</code></p> | ||
</td> | ||
<td> Decay </td> | ||
<td style="text-align:center"> | ||
<pre><code class="plaintext cell-output cell-result" class="language-plaintext"> +---------------+ | ||
|⠉⠙⢄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀| | ||
|⠀⠀⠈⠒⠒⠒⠒⡄⠀⠀⠀⠀⠀⠀⠀| | ||
|⠀⠀⠀⠀⠀⠀⠀⠈⠦⠤⠤⠤⠤⠤⠤| | ||
+---------------+ </code></pre> | ||
</td></tr> | ||
<tr><td> | ||
<p><a href="docstrings/ParameterSchedulers.Exp.html" title="`Exp`"><code>Exp(;λ, γ)</code></a></p> | ||
</td> | ||
<td> | ||
<p>Exponential decay by <code>γ</code> every iteration</p> | ||
</td> | ||
<td> Decay </td> | ||
<td style="text-align:center"> | ||
<pre><code class="plaintext cell-output cell-result" class="language-plaintext"> +---------------+ | ||
|⢣⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀| | ||
|⠀⠣⢄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀| | ||
|⠀⠀⠀⠓⠢⠤⢄⣀⣀⣀⣀⣀⣀⣀⣀| | ||
+---------------+ </code></pre> | ||
</td></tr> | ||
<tr><td> | ||
<p><a href="docstrings/ParameterSchedulers.Poly.html" title="`Poly`"><code>Poly(;λ, p, max_iter)</code></a></p> | ||
</td> | ||
<td> | ||
<p>Polynomial decay at degree <code>p</code></p> | ||
</td> | ||
<td> Decay </td> | ||
<td style="text-align:center"> | ||
<pre><code class="plaintext cell-output cell-result" class="language-plaintext"> +---------------+ | ||
|⠉⠢⢄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀| | ||
|⠀⠀⠀⠉⠒⠤⣀⠀⠀⠀⠀⠀⠀⠀⠀| | ||
|⠀⠀⠀⠀⠀⠀⠀⠉⠓⠒⠤⠤⣀⣀⣀| | ||
+---------------+ </code></pre> | ||
</td></tr> | ||
<tr><td> | ||
<p><a href="docstrings/ParameterSchedulers.Inv.html" title="`Inv`"><code>Inv(;λ, γ, p)</code></a></p> | ||
</td> | ||
<td> | ||
<p>Inverse decay at rate <code>(1 + tγ)^p</code></p> | ||
</td> | ||
<td> Decay </td> | ||
<td style="text-align:center"> | ||
<pre><code class="plaintext cell-output cell-result" class="language-plaintext"> +---------------+ | ||
|⢇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀| | ||
|⠈⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀| | ||
|⠀⠈⠑⠤⠤⢄⣀⣀⣀⣀⣀⣀⣀⣀⣀| | ||
+---------------+ </code></pre> | ||
</td></tr> | ||
<tr><td> | ||
<p><a href="docstrings/ParameterSchedulers.Tri.html" title="`Tri`"><code>Tri(;λ0, λ1, period)</code></a></p> | ||
</td> | ||
<td> | ||
<p><a href="https://en.wikipedia.org/wiki/Triangle_wave">Triangle wave</a> function</p> | ||
</td> | ||
<td> Cyclic </td> | ||
<td style="text-align:center"> | ||
<pre><code class="plaintext cell-output cell-result" class="language-plaintext"> +---------------+ | ||
|⠀⡼⡀⠀⡸⡇⠀⢠⢣⠀⠀⡾⡀⠀⡸| | ||
|⢰⠁⢇⢀⠇⢸⠀⡜⠈⡆⢸⠀⢣⢀⠇| | ||
|⡎⠀⠘⡜⠀⠀⢷⠁⠀⢱⡇⠀⠘⡜⠀| | ||
+---------------+ </code></pre> | ||
</td></tr> | ||
<tr><td> | ||
<p><a href="docstrings/ParameterSchedulers.TriDecay2.html" title="`TriDecay2`"><code>TriDecay2(;λ0, λ1, period)</code></a></p> | ||
</td> | ||
<td> | ||
<p><a href="https://en.wikipedia.org/wiki/Triangle_wave">Triangle wave</a> function with half the amplitude every <code>period</code></p> | ||
</td> | ||
<td> Cyclic </td> | ||
<td style="text-align:center"> | ||
<pre><code class="plaintext cell-output cell-result" class="language-plaintext"> +---------------+ | ||
|⠀⡼⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀| | ||
|⢰⠁⢇⠀⢠⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀| | ||
|⡎⠀⠘⣤⠃⠘⣄⡠⠒⢄⣀⡠⢄⣀⣀| | ||
+---------------+ </code></pre> | ||
</td></tr> | ||
<tr><td> | ||
<p><a href="docstrings/ParameterSchedulers.TriExp.html" title="`TriExp`"><code>TriExp(;λ0, λ1, period, γ)</code></a></p> | ||
</td> | ||
<td> | ||
<p><a href="https://en.wikipedia.org/wiki/Triangle_wave">Triangle wave</a> function with exponential amplitude decay at rate <code>γ</code></p> | ||
</td> | ||
<td> Cyclic </td> | ||
<td style="text-align:center"> | ||
<pre><code class="plaintext cell-output cell-result" class="language-plaintext"> +---------------+ | ||
|⠀⡼⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀| | ||
|⢰⠁⢇⠀⡰⢇⠀⠀⡀⠀⠀⠀⠀⠀⠀| | ||
|⡎⠀⠘⣴⠁⠈⢆⠎⠈⢆⣀⠜⠢⣀⠤| | ||
+---------------+ </code></pre> | ||
</td></tr> | ||
<tr><td> | ||
<p><a href="docstrings/ParameterSchedulers.Sin.html" title="`Sin`"><code>Sin(;λ0, λ1, period)</code></a></p> | ||
</td> | ||
<td> | ||
<p>Sine function</p> | ||
</td> | ||
<td> Cyclic </td> | ||
<td style="text-align:center"> | ||
<pre><code class="plaintext cell-output cell-result" class="language-plaintext"> +---------------+ | ||
|⠀⡼⡀⠀⡸⡇⠀⢠⢣⠀⠀⡾⡀⠀⡸| | ||
|⢰⠁⢇⢀⠇⢸⠀⡜⠈⡆⢸⠀⢣⢀⠇| | ||
|⡎⠀⠘⡜⠀⠀⢷⠁⠀⢱⡇⠀⠘⡜⠀| | ||
+---------------+ </code></pre> | ||
</td></tr> | ||
<tr><td> | ||
<p><a href="docstrings/ParameterSchedulers.SinDecay2.html" title="`SinDecay2`"><code>SinDecay2(;λ0, λ1, period)</code></a></p> | ||
</td> | ||
<td> | ||
<p>Sine function with half the amplitude every <code>period</code></p> | ||
</td> | ||
<td> Cyclic </td> | ||
<td style="text-align:center"> | ||
<pre><code class="plaintext cell-output cell-result" class="language-plaintext"> +---------------+ | ||
|⠀⡼⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀| | ||
|⢰⠁⢇⠀⢠⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀| | ||
|⡎⠀⠘⣤⠃⠘⣄⡠⠒⢄⣀⡠⢄⣀⣀| | ||
+---------------+ </code></pre> | ||
</td></tr> | ||
<tr><td> | ||
<p><a href="docstrings/ParameterSchedulers.SinExp.html" title="`SinExp`"><code>SinExp(;λ0, λ1, period)</code></a></p> | ||
</td> | ||
<td> | ||
<p>Sine function with exponential amplitude decay at rate <code>γ</code></p> | ||
</td> | ||
<td> Cyclic </td> | ||
<td style="text-align:center"> | ||
<pre><code class="plaintext cell-output cell-result" class="language-plaintext"> +---------------+ | ||
|⠀⡼⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀| | ||
|⢰⠁⢇⠀⡜⢇⠀⠀⡀⠀⠀⠀⠀⠀⠀| | ||
|⡎⠀⠘⡼⠀⠈⢆⠎⠈⢆⣀⠜⠢⣀⠤| | ||
+---------------+ </code></pre> | ||
</td></tr> | ||
<tr><td> | ||
<p><a href="docstrings/ParameterSchedulers.Cos.html" title="`Cos`"><code>Cos(;λ0, λ1, period)</code></a></p> | ||
</td> | ||
<td> | ||
<p>Cosine function</p> | ||
</td> | ||
<td> Cyclic </td> | ||
<td style="text-align:center"> | ||
<pre><code class="plaintext cell-output cell-result" class="language-plaintext"> +---------------+ | ||
|⡇⠀⢀⢧⠀⠀⡼⡀⠀⢰⡇⠀⢀⢧⠀| | ||
|⢸⠀⡜⠈⡆⢰⠁⢣⠀⡇⢸⠀⡸⠈⡆| | ||
|⠀⢧⠃⠀⢱⡎⠀⠘⡼⠀⠀⢧⠃⠀⢱| | ||
+---------------+ </code></pre> | ||
</td></tr> | ||
</tbody> | ||
</table> | ||
</article> | ||
<div id="page-navigation"> | ||
<a id="previous-page" title="Previous" href="README.html"><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.2426 6.34317L14.8284 4.92896L7.75739 12L14.8285 19.0711L16.2427 17.6569L10.5858 12L16.2426 6.34317Z" fill="currentColor" /></svg></a> | ||
<a id="next-page" title="Next" href="docs/tutorials/getting-started.html"><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10.5858 6.34317L12 4.92896L19.0711 12L12 19.0711L10.5858 17.6569L16.2427 12L10.5858 6.34317Z" fill="currentColor" /></svg></a> | ||
</div> | ||
<footer> | ||
Built with <a target="_blank" href="https://github.com/MichaelHatherly/Publish.jl">Publish.jl</a> and the <a target="_blank" href="https://julialang.org">Julia Language</a>. | ||
</footer> | ||
</main> | ||
<script>hljs.initHighlightingOnLoad();</script> | ||
<script> | ||
document.addEventListener("DOMContentLoaded", function() { | ||
renderMathInElement(document.body, { | ||
delimiters: [ | ||
{left: "$$", right: "$$", display: true}, | ||
{left: "$", right: "$", display: false}, | ||
{left: "\\(", right: "\\)", display: false}, | ||
{left: "\\[", right: "\\]", display: true} | ||
] | ||
}); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
theme = "flux-theme" | ||
version = "0.2.1" | ||
|
||
[html] | ||
default_css = [ | ||
"normalize.css", | ||
"https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css", | ||
"tabulator_simple.min.css", | ||
"publish.css", | ||
"default.min.css", | ||
"custom.css", | ||
] | ||
default_js = [ | ||
"https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js", | ||
"https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js", | ||
"versions.js", | ||
"lunr.js", | ||
"highlight.min.js", | ||
"tabulator.min.js", | ||
"julia.min.js", | ||
"julia-repl.min.js", | ||
"publish.js", | ||
] | ||
template = {file = "html.mustache"} | ||
|
||
[html_doc] | ||
default_css = [ | ||
"normalize.css", | ||
"bulma.min.css", | ||
"https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css", | ||
"tabulator_simple.min.css", | ||
"tocbot.min.css", | ||
"default.min.css", | ||
"publish_doc.css", | ||
] | ||
default_js = [ | ||
"https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js", | ||
"https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js", | ||
"tocbot.min.js", | ||
"highlight.min.js", | ||
"tabulator.min.js", | ||
"mermaid.min.js", | ||
"svg-pan-zoom.min.js", | ||
"julia.min.js", | ||
"julia-repl.min.js", | ||
"publish_doc.js", | ||
] | ||
template = {file = "html_doc.mustache"} | ||
|
||
[latex] | ||
documentclass = "article" | ||
template = {file = "latex.mustache"} |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.