From d6dd27dae587f4fcf98093b5f6de387340792007 Mon Sep 17 00:00:00 2001 From: Mike J Innes Date: Wed, 18 Oct 2017 12:47:45 +0100 Subject: [PATCH] dense layer example --- src/layers/basic.jl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/layers/basic.jl b/src/layers/basic.jl index 0ae5f8fa..26b2daaf 100644 --- a/src/layers/basic.jl +++ b/src/layers/basic.jl @@ -44,6 +44,14 @@ Creates a traditional `Dense` layer with parameters `W` and `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`. + + julia> d = Dense(5, 2) + Dense(5, 2) + + julia> d(rand(5)) + Tracked 2-element Array{Float64,1}: + 0.00257447 + -0.00449443 """ struct Dense{F,S,T} σ::F