diff --git a/latest/models/layers.html b/latest/models/layers.html index f7d2e0ff..44233755 100644 --- a/latest/models/layers.html +++ b/latest/models/layers.html @@ -11,4 +11,10 @@ m(5) == 26 m = Chain(Dense(10, 5), Dense(5, 2)) x = rand(10) -m(x) == m[2](m[1](x))
Chain
also supports indexing and slicing, e.g. m[2]
or m[1:end-1]
. m[1:3](x)
will calculate the output of the first three layers.
Flux.Dense
— Type.Dense(in::Integer, out::Integer, σ = identity)
Creates a traditional Dense
layer with parameters W
and b
.
y = σ.(W * x .+ b)
The input x
must be a vector of length in
, or a batch of vectors represented as an in × N
matrix. The out y
will be a vector or batch of length in
.