File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -31,13 +31,16 @@ Copy all the parameters (trainable and non-trainable) from `src` into `dst`.
3131
3232Recursively walks `dst` and `src` together using [`Functors.children`](@ref),
3333and 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
3740Throws 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
You can’t perform that action at this time.
0 commit comments