aboutsummaryrefslogblamecommitdiff
path: root/layer/sigmoid.lua
blob: d69e9e351910c443e51891545ceb70971e945726 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                                                                        
local SigmoidLayer = nerv.class("nerv.SigmoidLayer", "nerv.Layer")

function SigmoidLayer:__init(id, global_conf)
    self.id = id
    self.gconf = global_conf
end

function SigmoidLayer:propagate(input, output)
    output:sigmoid(input)
end

function SigmoidLayer:back_propagate(next_bp_err, bp_err, input, output)
    next_bp_err:sigmoid(bp_err, output)
end