public abstract class BaseOp extends Object implements Op
| Modifier and Type | Field and Description |
|---|---|
protected Object[] |
extraArgs |
protected int |
n |
protected int |
numProcessed |
protected boolean |
passThrough |
protected INDArray |
x |
protected INDArray |
y |
protected INDArray |
z |
| Constructor and Description |
|---|
BaseOp() |
BaseOp(INDArray x)
An op for one ndarray
|
BaseOp(INDArray x,
INDArray z)
Specify an alternative result array
|
BaseOp(INDArray x,
INDArray y,
INDArray z,
int n) |
BaseOp(INDArray x,
INDArray z,
int n)
Specify an alternative output array
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
ensureProperVectors(INDArray x,
INDArray y,
INDArray z) |
void |
exec()
Execute the op if its pass through (not needed most of the time)
|
void |
exec(int... dimensions)
Exec along each dimension
|
Object[] |
extraArgs()
Extra arguments
|
void |
init(INDArray x,
INDArray y,
INDArray z,
int n)
Initialize the operation based on the parameters
|
boolean |
isPassThrough()
Returns whether the op should be executed or not (through the executioner)
|
int |
n()
The number of elements to do a op over
|
int |
numProcessed()
Number processed
|
void |
setN(int n)
Change n
|
void |
setX(INDArray x)
set x (the input ndarray)
|
void |
setY(INDArray y)
set y(the pairwise ndarray)
|
void |
setZ(INDArray z)
set z (the solution ndarray)
|
String |
toString() |
INDArray |
x()
The origin ndarray
|
INDArray |
y()
The pairwise op ndarray
|
INDArray |
z()
The resulting ndarray
|
protected INDArray x
protected INDArray y
protected INDArray z
protected int n
protected int numProcessed
protected Object[] extraArgs
protected boolean passThrough
public BaseOp()
public BaseOp(INDArray x, INDArray z)
x - the inputz - the output arraypublic BaseOp(INDArray x, INDArray z, int n)
x - the inputz - the outputn - the number of elements to iterate onpublic BaseOp(INDArray x)
x - the ndarraypublic boolean isPassThrough()
OpisPassThrough in interface Oppublic void setZ(INDArray z)
Oppublic int n()
Oppublic void init(INDArray x, INDArray y, INDArray z, int n)
Oppublic void setN(int n)
Oppublic int numProcessed()
OpnumProcessed in interface Oppublic void exec()
OpCopyright © 2016. All Rights Reserved.