Skip to content

Commit 9b06730

Browse files
committed
Clarify docstrings as per review
1 parent 3c82471 commit 9b06730

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/loading.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,16 @@ Copy all the parameters (trainable and non-trainable) from `src` into `dst`.
3131
3232
Recursively walks `dst` and `src` together using [`Functors.children`](@ref),
3333
and calling `copyto!` on parameter arrays.
34-
Non-array elements (such as activation functions) need not match.
35-
An all-zero bias array can be copied to or from absent bias, encoded `bias = false`.
34+
Non-array elements (such as activation functions) are not copied
35+
and do not need to match between `dst` and `src`.
36+
Inactive parameters, encoded by `false` in place on an array,
37+
can be copied to and from all-zero arrays.
38+
Attempting to copy a non-zero array to/from an inactive parameter will throw an error.
3639
3740
Throws an error when:
3841
- `dst` and `src` do not share the same fields (at any level)
3942
- the sizes of leaf nodes are mismatched between `dst` and `src`
40-
- `dst` is a "tied" parameter (e.g. `transpose` of another parameter) and
43+
- `dst` is a "tied" parameter (i.e. refers to another parameter) and
4144
loaded into multiple times with mismatched source values
4245
4346
```julia

0 commit comments

Comments
 (0)