Home | Trees | Indices | Help |
---|
|
object --+ | Layer --+ | SpeedLayer
This layer provides an extra set of weights as a support the momentum algorithm for SGD. At time point t, we need weights at t-1 and the gradient at t to update weights. Namely
w(t+1) - w(t) = - rho * dE(w)/dw + p s(t), for t = 0, 1, ... and s(0) = 0
I call w(t) - w(t-1) = s(t) (speed)
|
|||
Inherited from |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from |
|
|||
|
|||
|
|
|||
__abstractmethods__ =
|
|||
Inherited from |
|
|||
Inherited from |
|
initialize by the given weight properties, all params are lists of the same length
|
speed update formula new_speed = -rho * g + mu*s
|
speed update for the given gradient new_weight = cur_weight + speed
|
get weights
|
get speeds
|
set weights
|
set speeds
|
update speeds for the given gradients new_speed = -rho * gradient + mu*cur_speed
|
update speeds for the current speed new_weight = cur_weight + cur_speed |
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Wed Aug 21 01:14:52 2013 | http://epydoc.sourceforge.net |