correct train! syntax

This commit is contained in:
Dhairya Gandhi 2019-10-22 16:25:55 +05:30
parent b03f34dcb6
commit a9955fec8a
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ model = Chain(
loss(x, y) = crossentropy(model(x), y)
Flux.train!(loss, data, ADAM(...))
Flux.train!(loss, params(model), data, ADAM(...))
```
Yet you can easily strip away the layers, and directly write the mathematics for your problem. Flux will seamlessly take gradients of any Julia code, so your model looks just like the paper.