update logreg example
This commit is contained in:
parent
15b3ce1ada
commit
5c548fe1c4
|
@ -17,7 +17,7 @@ makedocs(modules=[Flux],
|
|||
"Backends" => "apis/backends.md",
|
||||
"Storing Models" => "apis/storage.md"],
|
||||
"In Action" => [
|
||||
"Logistic Regression" => "examples/logreg.md",
|
||||
"Simple MNIST" => "examples/logreg.md",
|
||||
"Char RNN" => "examples/char-rnn.md"],
|
||||
"Contributing & Help" => "contributing.md",
|
||||
"Internals" => "internals.md"])
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Logistic Regression with MNIST
|
||||
# Recognising MNIST Digits
|
||||
|
||||
This walkthrough example will take you through writing a multi-layer perceptron that classifies MNIST digits with high accuracy.
|
||||
|
||||
|
@ -40,7 +40,7 @@ m = Chain(
|
|||
Affine( 64), relu,
|
||||
Affine( 10), softmax)
|
||||
|
||||
model = tf(m)
|
||||
model = mxnet(m) # Convert to MXNet
|
||||
```
|
||||
|
||||
We can try this out on our data already:
|
||||
|
|
|
@ -10,13 +10,13 @@ m = Chain(
|
|||
Affine( 64), relu,
|
||||
Affine( 10), softmax)
|
||||
|
||||
# Convert to TensorFlow
|
||||
model = tf(m)
|
||||
# Convert to MXNet
|
||||
model = mxnet(m)
|
||||
|
||||
# An example prediction pre-training
|
||||
model(data[1][1])
|
||||
|
||||
@time Flux.train!(model, train, test, η = 1e-4)
|
||||
Flux.train!(model, train, test, η = 1e-4)
|
||||
|
||||
# An example prediction post-training
|
||||
model(data[1][1])
|
||||
|
|
Loading…
Reference in New Issue