Skip to content

Commit 6476a31

Browse files
Merge pull request #1933 from prbzrg/fix-code-block
Fix a code block
2 parents 674527e + df1a78c commit 6476a31

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/src/saving.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,14 @@ versions of Flux).
5757
Saving models this way will only store the trainable parameters which
5858
will result in incorrect behavior for layers like `BatchNorm`.
5959

60-
```Julia
60+
```julia
6161
julia> using Flux
6262

6363
julia> model = Chain(Dense(10 => 5,relu),Dense(5 => 2),softmax)
6464
Chain(Dense(10, 5, NNlib.relu), Dense(5, 2), NNlib.softmax)
6565

6666
julia> weights = Flux.params(model);
67+
```
6768

6869
Loading the model as shown above will return a new model with the stored parameters.
6970
But sometimes you already have a model, and you want to load stored parameters into it.
@@ -127,4 +128,3 @@ exactly where you left off. BSON is smart enough to [cache values](https://githu
127128
opt = ADAM()
128129
@save "model-$(now()).bson" model opt
129130
```
130-

0 commit comments

Comments
 (0)