org.nd4j.linalg.api.activation
Class BaseActivationFunction
- java.lang.Object
-
- org.nd4j.linalg.api.activation.BaseActivationFunction
-
- All Implemented Interfaces:
- Function<INDArray,INDArray>, java.io.Serializable, ActivationFunction
- Direct Known Subclasses:
- Exp, HardTanh, Linear, MaxOut, RectifiedLinear, RoundedLinear, Sigmoid, SoftMax, Tanh
public abstract class BaseActivationFunction extends java.lang.Object implements ActivationFunction
Base activation function: mainly to give the function a canonical representation- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description BaseActivationFunction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description INDArrayapply(INDArray input)Returns the result of applying this function toinput.booleanequals(java.lang.Object o)Indicates whether another object is equal to this function.java.lang.StringtoString()The type()java.lang.Stringtype()Name of the function-
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.nd4j.linalg.api.activation.ActivationFunction
applyDerivative, transformClazz
-
-
-
-
Method Detail
-
type
public java.lang.String type()
Name of the function- Specified by:
typein interfaceActivationFunction- Returns:
- the name of the function
-
equals
public boolean equals(java.lang.Object o)
Description copied from interface:FunctionIndicates whether another object is equal to this function.Most implementations will have no reason to override the behavior of
Object.equals(java.lang.Object). However, an implementation may also choose to returntruewheneverobjectis aFunctionthat it considers interchangeable with this one. "Interchangeable" typically means thatObjects.equal(this.apply(f), that.apply(f))is true for allfof typeF. Note that afalseresult from this method does not imply that the functions are known not to be interchangeable.
-
toString
public java.lang.String toString()
The type()- Overrides:
toStringin classjava.lang.Object- Returns:
-
apply
public INDArray apply(INDArray input)
Returns the result of applying this function toinput. This method is generally expected, but not absolutely required, to have the following properties:- Its execution does not cause any observable side effects.
- The computation is consistent with equals; that is,
Objects.equal(a, b)implies thatObjects.equal(function.apply(a), function.apply(b)).
-
-
DMelt 3.0 © DataMelt by jWork.ORG