Skip to content

Commit e8a67b4

Browse files
Merge #1752
1752: Clarify that `params` updates r=ToucheSir a=KronosTheLate I was confused when initally reading the overciew, because I though that `params` returned a tuple of vectors. I see now that the printing of `parameters` reveals the output to be something else, but I think it is relevant what a less experienced programmer may read it as. It later becomes apparent that it actually returns another data-structure, because it updates when parameters change. I have added a single sentence to clarify this point. Edits on the wording/phrasing are very welcome. Co-authored-by: KronosTheLate <61620837+KronosTheLate@users.noreply.github.com>
2 parents e1268a6 + 6845675 commit e8a67b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/src/models/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ julia> parameters = Flux.params(predict)
117117
Params([[-0.99009055], [0.0]])
118118
```
119119

120-
These are the parameters Flux will change, one step at a time, to improve predictions. Each of the parameters comes from the `predict` model:
120+
These are the parameters Flux will change, one step at a time, to improve predictions. At each step, the contents of this `Params` object changes too, since it is just a collection of references to the mutable arrays inside the model:
121121

122122
```
123123
julia> predict.weight in parameters, predict.bias in parameters

0 commit comments

Comments
 (0)