From bc68dfbd750e0cc9dbc9cf41abc92c55d9f49fba Mon Sep 17 00:00:00 2001 From: Ayan Banerjee Date: Wed, 23 Jan 2019 19:20:10 +0530 Subject: [PATCH] docs/basics.md: Add `using Flux` In order to import sigmoid function. --- docs/src/models/basics.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/src/models/basics.md b/docs/src/models/basics.md index 430f89f3..606dac1c 100644 --- a/docs/src/models/basics.md +++ b/docs/src/models/basics.md @@ -102,6 +102,8 @@ All deep learning in Flux, however complex, is a simple generalisation of this e It's common to create more complex models than the linear regression above. For example, we might want to have two linear layers with a nonlinearity like [sigmoid](https://en.wikipedia.org/wiki/Sigmoid_function) (`σ`) in between them. In the above style we could write this as: ```julia +using Flux + W1 = param(rand(3, 5)) b1 = param(rand(3)) layer1(x) = W1 * x .+ b1