bob.machine.MultipliedHyperbolicTangentActivation¶
-
class
bob.machine.MultipliedHyperbolicTangentActivation((object)self[, (float)C=1.0[, (float)M=1.0]]) → None :¶ Bases:
bob.machine._machine.ActivationComputes \(f(z) = C \cdot \tanh(Mz)\) as activation function
Builds a new hyperbolic tangent activation fucntion with a given constant for the inner and outter products. Don’t use this if you just want to set the constants to the default values (1.0). In such a case, prefer to use the more efficient
bob.machine.HyperbolicTangentActivation.-
__init__((object)self[, (float)C=1.0[, (float)M=1.0]]) → None :¶ Builds a new hyperbolic tangent activation fucntion with a given constant for the inner and outter products. Don’t use this if you just want to set the constants to the default values (1.0). In such a case, prefer to use the more efficient
bob.machine.HyperbolicTangentActivation.
Methods
__init__((object)self [, (float)C=1.0 [, …)Builds a new hyperbolic tangent activation fucntion with a given constant for the inner and outter products. f((Activation)self, (object)z, (object)res)Computes the activated value, given an input array z, placing results inres(and returning it)f_prime((Activation)self, (object)z, (object)res)Computes the derivative of the activated value, placing results in res(and returning it)f_prime_from_f((Activation)self, (object)a, …)Computes the derivative of the activated value, given the activated value a, placing results inres(and returning it)load((Activation)self, (HDF5File)h5f)Loads itself from a bob.io.HDF5Filesave((Activation)self, (HDF5File)h5f)Saves itself to a bob.io.HDF5Fileunique_identifier((Activation)self)Returns a unique identifier, used by this class in connection to the Activation registry. Attributes
CThe outside multiplication factor for the hyperbolic tangent function MThe inner multiplication factor for the argument -
C¶ The outside multiplication factor for the hyperbolic tangent function
-
M¶ The inner multiplication factor for the argument
-
__call__((Activation)self, (object)z, (object)res) → object :¶ Computes the activated value, given an input array
z, placing results inres(and returning it)- __call__( (Activation)self, (object)z) -> object :
- Computes the activated value, given an input array
z. Returns a newly allocated array with the same size asz - __call__( (Activation)self, (float)z) -> float :
- Computes the activated value, given an input
z
-
f((Activation)self, (object)z, (object)res) → object :¶ Computes the activated value, given an input array
z, placing results inres(and returning it)- f( (Activation)self, (object)z) -> object :
- Computes the activated value, given an input array
z. Returns a newly allocated array with the answers - f( (Activation)self, (float)z) -> float :
- Computes the activated value, given an input
z
-
f_prime((Activation)self, (object)z, (object)res) → object :¶ Computes the derivative of the activated value, placing results in
res(and returning it)- f_prime( (Activation)self, (object)z) -> object :
- Computes the derivative of the activated value, given an input array
z. Returns a newly allocated array with the same size asz - f_prime( (Activation)self, (float)z) -> float :
- Computes the derivative of the activated value.
-
f_prime_from_f((Activation)self, (object)a, (object)res) → object :¶ Computes the derivative of the activated value, given the activated value
a, placing results inres(and returning it)- f_prime_from_f( (Activation)self, (object)z) -> object :
- Computes the derivative of the activated value, given the activated value
a. Returns a newly allocated array with the same size asawith the answer. - f_prime_from_f( (Activation)self, (float)a) -> float :
- Computes the derivative of the activation value, given the activated value
a.
-
load((Activation)self, (HDF5File)h5f) → None :¶ Loads itself from a
bob.io.HDF5File
-
save((Activation)self, (HDF5File)h5f) → None :¶ Saves itself to a
bob.io.HDF5File
-
unique_identifier((Activation)self) → str :¶ Returns a unique identifier, used by this class in connection to the Activation registry.
-