|
|
@ -17,7 +17,7 @@ __all__ = [
|
|
|
|
"IdentityActivation", "LinearActivation", 'SequenceSoftmaxActivation',
|
|
|
|
"IdentityActivation", "LinearActivation", 'SequenceSoftmaxActivation',
|
|
|
|
'ExpActivation', "ReluActivation", "BReluActivation", "SoftReluActivation",
|
|
|
|
'ExpActivation', "ReluActivation", "BReluActivation", "SoftReluActivation",
|
|
|
|
"STanhActivation", "AbsActivation", "SquareActivation", "BaseActivation",
|
|
|
|
"STanhActivation", "AbsActivation", "SquareActivation", "BaseActivation",
|
|
|
|
"LogActivation"
|
|
|
|
"LogActivation", "SqrtActivation", "ReciprocalActivation"
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -224,3 +224,27 @@ class LogActivation(BaseActivation):
|
|
|
|
|
|
|
|
|
|
|
|
def __init__(self):
|
|
|
|
def __init__(self):
|
|
|
|
BaseActivation.__init__(self, 'log', False)
|
|
|
|
BaseActivation.__init__(self, 'log', False)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class SqrtActivation(BaseActivation):
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
Square Root Activation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. math::
|
|
|
|
|
|
|
|
f(z) = sqrt(z)
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def __init__(self):
|
|
|
|
|
|
|
|
BaseActivation.__init__(self, 'sqrt', False)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class ReciprocalActivation(BaseActivation):
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
Reciprocal Activation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. math::
|
|
|
|
|
|
|
|
f(z) = 1/z
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def __init__(self):
|
|
|
|
|
|
|
|
BaseActivation.__init__(self, 'reciprocal', False)
|
|
|
|