machine-learning.functions: Add selu

modern-harvey2
Doug Coleman 2017-07-30 11:40:25 -05:00
parent a515af7d68
commit bfd830f6b4
1 changed files with 5 additions and 1 deletions

View File

@ -11,6 +11,10 @@ IN: machine-learning.functions
: leaky-relu ( x a -- x' )
over 0 < [ * ] [ drop ] if ; inline
! https://arxiv.org/pdf/1706.02515.pdf
: selu ( x a -- x' )
over 0 < [ [ [ e^ ] dip * ] keep - ] [ drop ] if ; inline
: default-leaky-relu ( x -- x' )
.01 leaky-relu ; inline
@ -24,4 +28,4 @@ IN: machine-learning.functions
vexp-sum '[ e^ _ * recip log ] map ;
: softmin ( seq -- softmin )
vneg softmax ; inline
vneg softmax ; inline