org.nd4j.linalg.ops
Class BaseElementWiseOp
- java.lang.Object
-
- org.nd4j.linalg.ops.BaseElementWiseOp
-
- All Implemented Interfaces:
- ElementWiseOp
- Direct Known Subclasses:
- Abs, BaseTwoArrayElementWiseOp, EqualTo, Exp, Floor, GreaterThan, HardTanh, Identity, LessThan, Log, Max, MaxOut, Negative, NotEqualTo, Pow, Round, Sigmoid, Sign, Sqrt, Stabilize, Tanh
public abstract class BaseElementWiseOp extends java.lang.Object implements ElementWiseOp
Baseline element wise operation so only applyTransformToOrigin has to be implemented. This also handles the ability to perform scalar wise operations vs just a functional transformation
-
-
Constructor Summary
Constructors Constructor and Description BaseElementWiseOp()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidapplyTransformToOrigin(INDArray origin, int i)Apply the transformation at from[i]voidapplyTransformToOrigin(INDArray origin, int i, java.lang.Object valueToApply)Apply the transformation at from[i] using the supplied valuevoidexec()Apply the transformationINDArrayfrom()The input matrixjava.lang.ObjectgetFromOrigin(INDArray origin, int i)Get the element at from at index istatic java.util.concurrent.ExecutorServicegetThreads()-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.nd4j.linalg.ops.ElementWiseOp
apply
-
-
-
-
Method Detail
-
getThreads
public static java.util.concurrent.ExecutorService getThreads()
-
applyTransformToOrigin
public void applyTransformToOrigin(INDArray origin, int i)
Apply the transformation at from[i]- Specified by:
applyTransformToOriginin interfaceElementWiseOp- Parameters:
i- the index of the element to apply the transform toorigin- the origin ndarray
-
applyTransformToOrigin
public void applyTransformToOrigin(INDArray origin, int i, java.lang.Object valueToApply)
Apply the transformation at from[i] using the supplied value- Specified by:
applyTransformToOriginin interfaceElementWiseOp- Parameters:
origin- the origin ndarrayi- the index of the element to applyTransformToOriginvalueToApply- the value to apply to the given index
-
getFromOrigin
public java.lang.Object getFromOrigin(INDArray origin, int i)
Description copied from interface:ElementWiseOpGet the element at from at index i- Specified by:
getFromOriginin interfaceElementWiseOp- Parameters:
origin- the origin ndarrayi- the index of the element to retrieve- Returns:
- the element at index i
-
from
public INDArray from()
The input matrix- Specified by:
fromin interfaceElementWiseOp- Returns:
-
exec
public void exec()
Apply the transformation- Specified by:
execin interfaceElementWiseOp
-
-
DMelt 3.0 © DataMelt by jWork.ORG