Skip to content

Commit

Permalink
build based on 32a909a
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Mar 20, 2024
1 parent 13a7eae commit 1a8eabe
Show file tree
Hide file tree
Showing 26 changed files with 1,769 additions and 2,268 deletions.
51 changes: 15 additions & 36 deletions dev/api/Lux/contrib.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ Starting v"0.5.2" all Experimental features need to be accessed via `Lux.Experim
- [`Lux.Experimental.DebugLayer`](#Lux.Experimental.DebugLayer)
- [`Lux.Experimental.FrozenLayer`](#Lux.Experimental.FrozenLayer)
- [`Lux.Experimental.TrainState`](#Lux.Experimental.TrainState)
- [`Lux.Experimental.apply_gradients`](#Lux.Experimental.apply_gradients)
- [`Lux.Experimental.compute_gradients`](#Lux.Experimental.compute_gradients)
- [`Lux.Experimental.freeze`](#Lux.Experimental.freeze)
- [`Lux.Experimental.layer_map`](#Lux.Experimental.layer_map)
Expand Down Expand Up @@ -70,7 +69,7 @@ Training State containing:
* `step`: Number of updates of the parameters made.


<a target='_blank' href='https://github.com/LuxDL/Lux.jl/blob/bcea47c7d4deddb69a74b13eb10aed14d0bdfb70/src/contrib/training.jl#L3-L13' class='documenter-source'>source</a><br>
<a target='_blank' href='https://github.com/LuxDL/Lux.jl/blob/32a909ae3e32f708cf52f344e87e21f3f2b12bd1/src/contrib/training.jl#L3-L13' class='documenter-source'>source</a><br>

</div>
<br>
Expand Down Expand Up @@ -103,35 +102,15 @@ A 4-Tuple containing:
* `ts`: Updated Training State.


<a target='_blank' href='https://github.com/LuxDL/Lux.jl/blob/bcea47c7d4deddb69a74b13eb10aed14d0bdfb70/src/contrib/training.jl#L68-L92' class='documenter-source'>source</a><br>
<a target='_blank' href='https://github.com/LuxDL/Lux.jl/blob/32a909ae3e32f708cf52f344e87e21f3f2b12bd1/src/contrib/training.jl#L24-L48' class='documenter-source'>source</a><br>

</div>
<br>
<div style='border-width:1px; border-style:solid; border-color:black; padding: 1em; border-radius: 25px;'>
<a id='Lux.Experimental.apply_gradients' href='#Lux.Experimental.apply_gradients'>#</a>&nbsp;<b><u>Lux.Experimental.apply_gradients</u></b> &mdash; <i>Function</i>.



```julia
apply_gradients(ts::TrainState, grads)
```

Update the parameters stored in `ts` using the gradients `grads`.

**Arguments**
!!! warning "Missing docstring."
Missing docstring for `Lux.Experimental.apply_gradients`. Check Documenter's build log for details.

* `ts`: `TrainState` object.
* `grads`: Gradients of the loss function wrt `ts.params`.

**Returns**

Updated `TrainState` object.


<a target='_blank' href='https://github.com/LuxDL/Lux.jl/blob/bcea47c7d4deddb69a74b13eb10aed14d0bdfb70/src/contrib/training.jl#L49-L62' class='documenter-source'>source</a><br>

</div>
<br>

<a id='Parameter-Freezing'></a>

Expand Down Expand Up @@ -205,7 +184,7 @@ m = Lux.Experimental.FrozenLayer(Dense(2 => 2), (:weight,))
See also [`Lux.Experimental.freeze`](contrib#Lux.Experimental.freeze), [`Lux.Experimental.unfreeze`](contrib#Lux.Experimental.unfreeze).


<a target='_blank' href='https://github.com/LuxDL/Lux.jl/blob/bcea47c7d4deddb69a74b13eb10aed14d0bdfb70/src/contrib/freeze.jl#L1-L57' class='documenter-source'>source</a><br>
<a target='_blank' href='https://github.com/LuxDL/Lux.jl/blob/32a909ae3e32f708cf52f344e87e21f3f2b12bd1/src/contrib/freeze.jl#L1-L57' class='documenter-source'>source</a><br>

</div>
<br>
Expand All @@ -221,7 +200,7 @@ freeze(l::AbstractExplicitLayer, which_params::Union{Tuple, Nothing} = nothing)
Constructs a version of `l` with `which_params` frozen. If `which_params` is nothing, then all parameters are frozen.


<a target='_blank' href='https://github.com/LuxDL/Lux.jl/blob/bcea47c7d4deddb69a74b13eb10aed14d0bdfb70/src/contrib/freeze.jl#L107-L112' class='documenter-source'>source</a><br>
<a target='_blank' href='https://github.com/LuxDL/Lux.jl/blob/32a909ae3e32f708cf52f344e87e21f3f2b12bd1/src/contrib/freeze.jl#L107-L112' class='documenter-source'>source</a><br>


```
Expand All @@ -232,7 +211,7 @@ freeze(l::AbstractExplicitLayer, ps, st::NamedTuple,
Construct a [`Lux.Experimental.FrozenLayer`](contrib#Lux.Experimental.FrozenLayer) for `l` with the current parameters and states. If `which_params` is nothing, then all parameters are frozen.


<a target='_blank' href='https://github.com/LuxDL/Lux.jl/blob/bcea47c7d4deddb69a74b13eb10aed14d0bdfb70/src/contrib/freeze.jl#L117-L123' class='documenter-source'>source</a><br>
<a target='_blank' href='https://github.com/LuxDL/Lux.jl/blob/32a909ae3e32f708cf52f344e87e21f3f2b12bd1/src/contrib/freeze.jl#L117-L123' class='documenter-source'>source</a><br>

</div>
<br>
Expand All @@ -248,7 +227,7 @@ unfreeze(l::FrozenLayer)
Unfreezes the layer `l`.


<a target='_blank' href='https://github.com/LuxDL/Lux.jl/blob/bcea47c7d4deddb69a74b13eb10aed14d0bdfb70/src/contrib/freeze.jl#L141-L145' class='documenter-source'>source</a><br>
<a target='_blank' href='https://github.com/LuxDL/Lux.jl/blob/32a909ae3e32f708cf52f344e87e21f3f2b12bd1/src/contrib/freeze.jl#L141-L145' class='documenter-source'>source</a><br>


```
Expand All @@ -258,7 +237,7 @@ unfreeze(l::FrozenLayer, ps, st::NamedTuple)
Unwraps a [`Lux.Experimental.FrozenLayer`](contrib#Lux.Experimental.FrozenLayer) `l` with the current parameters and states.


<a target='_blank' href='https://github.com/LuxDL/Lux.jl/blob/bcea47c7d4deddb69a74b13eb10aed14d0bdfb70/src/contrib/freeze.jl#L148-L152' class='documenter-source'>source</a><br>
<a target='_blank' href='https://github.com/LuxDL/Lux.jl/blob/32a909ae3e32f708cf52f344e87e21f3f2b12bd1/src/contrib/freeze.jl#L148-L152' class='documenter-source'>source</a><br>

</div>
<br>
Expand Down Expand Up @@ -319,7 +298,7 @@ Lux.layer_map(zero_dense_params, c, ps, st)
```


<a target='_blank' href='https://github.com/LuxDL/Lux.jl/blob/bcea47c7d4deddb69a74b13eb10aed14d0bdfb70/src/contrib/map.jl#L42' class='documenter-source'>source</a><br>
<a target='_blank' href='https://github.com/LuxDL/Lux.jl/blob/32a909ae3e32f708cf52f344e87e21f3f2b12bd1/src/contrib/map.jl#L42' class='documenter-source'>source</a><br>

</div>
<br>
Expand Down Expand Up @@ -360,7 +339,7 @@ Lux.@layer_map zero_dense_params c ps st
```


<a target='_blank' href='https://github.com/LuxDL/Lux.jl/blob/bcea47c7d4deddb69a74b13eb10aed14d0bdfb70/src/contrib/map.jl#L4' class='documenter-source'>source</a><br>
<a target='_blank' href='https://github.com/LuxDL/Lux.jl/blob/32a909ae3e32f708cf52f344e87e21f3f2b12bd1/src/contrib/map.jl#L4' class='documenter-source'>source</a><br>

</div>
<br>
Expand All @@ -386,7 +365,7 @@ Recurses into the `layer` and replaces the inner most non Container Layers with
See [`Lux.Experimental.DebugLayer`](contrib#Lux.Experimental.DebugLayer) for details about the Keyword Arguments.


<a target='_blank' href='https://github.com/LuxDL/Lux.jl/blob/bcea47c7d4deddb69a74b13eb10aed14d0bdfb70/src/contrib/debug.jl#L158-L165' class='documenter-source'>source</a><br>
<a target='_blank' href='https://github.com/LuxDL/Lux.jl/blob/32a909ae3e32f708cf52f344e87e21f3f2b12bd1/src/contrib/debug.jl#L158-L165' class='documenter-source'>source</a><br>

</div>
<br>
Expand Down Expand Up @@ -438,7 +417,7 @@ If `nan_check` is enabled and NaNs are detected then a `DomainError` is thrown.
See [`Lux.Experimental.@debug_mode`](contrib#Lux.Experimental.@debug_mode) to construct this layer.


<a target='_blank' href='https://github.com/LuxDL/Lux.jl/blob/bcea47c7d4deddb69a74b13eb10aed14d0bdfb70/src/contrib/debug.jl#L1-L49' class='documenter-source'>source</a><br>
<a target='_blank' href='https://github.com/LuxDL/Lux.jl/blob/32a909ae3e32f708cf52f344e87e21f3f2b12bd1/src/contrib/debug.jl#L1-L49' class='documenter-source'>source</a><br>

</div>
<br>
Expand Down Expand Up @@ -482,7 +461,7 @@ ps = Lux.share_parameters(ps, (("d3.l2", "d1"), ("d2", "d3.l1")))
```


<a target='_blank' href='https://github.com/LuxDL/Lux.jl/blob/bcea47c7d4deddb69a74b13eb10aed14d0bdfb70/src/contrib/share_parameters.jl#L3-L36' class='documenter-source'>source</a><br>
<a target='_blank' href='https://github.com/LuxDL/Lux.jl/blob/32a909ae3e32f708cf52f344e87e21f3f2b12bd1/src/contrib/share_parameters.jl#L3-L36' class='documenter-source'>source</a><br>

</div>
<br>
Expand Down Expand Up @@ -606,7 +585,7 @@ Array Parameter don't print the number of parameters on the side. However, they
:::


<a target='_blank' href='https://github.com/LuxDL/Lux.jl/blob/bcea47c7d4deddb69a74b13eb10aed14d0bdfb70/src/contrib/compact.jl#L17-L133' class='documenter-source'>source</a><br>
<a target='_blank' href='https://github.com/LuxDL/Lux.jl/blob/32a909ae3e32f708cf52f344e87e21f3f2b12bd1/src/contrib/compact.jl#L17-L133' class='documenter-source'>source</a><br>

</div>
<br>
Loading

0 comments on commit 1a8eabe

Please sign in to comment.