Skip to content

Commit

Permalink
making x Float32 in migrate from Flux example (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrevaya authored and avik-pal committed Sep 8, 2022
1 parent 846a82c commit 138d824
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/src/manual/migrate_from_flux.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ make in the following example.
model = Chain(Dense(2 => 4), BatchNorm(4, relu), Dense(4 => 2))
rng = Random.default_rng()
x = randn(rng, 2, 4)
x = randn(rng, Float32, 2, 4)
ps, st = Lux.setup(rng, model)
Expand All @@ -30,7 +30,7 @@ make in the following example.
model = Chain(Dense(2 => 4), BatchNorm(4, relu), Dense(4 => 2))
rng = Random.default_rng()
x = randn(rng, 2, 4)
x = randn(rng, Float32, 2, 4)
Expand Down Expand Up @@ -205,4 +205,4 @@ x = randn(rng, 3, 1)
ps, st = Lux.setup(rng, lmodel)

lmodel(x, ps, st)[1] == fmodel(x)
```
```

0 comments on commit 138d824

Please sign in to comment.