public abstract class BaseOp extends Object implements Op
Modifier and Type | Field and Description |
---|---|
protected Object[] |
extraArgs |
protected long |
n |
protected long |
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,
long n) |
BaseOp(INDArray x,
INDArray z,
long n)
Specify an alternative output array
|
Modifier and Type | Method and Description |
---|---|
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
|
Buffer |
extraArgsBuff()
Returns a buffer of either float
or double
of the extra args for this buffer
|
DataBuffer |
extraArgsDataBuff()
Returns the extra args as a data buffer
|
static Op.Type |
getOpType(Op op) |
void |
init(INDArray x,
INDArray y,
INDArray z,
long n)
Initialize the operation based on the parameters
|
boolean |
isExecSpecial()
Whether the executioner
needs to do a special call or not
|
boolean |
isPassThrough()
Returns whether the op should be executed or not (through the executioner)
|
long |
n()
The number of elements to do a op over
|
long |
numProcessed()
Number processed
|
void |
setN(long 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 long n
protected long 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, long n)
x
- the inputz
- the outputn
- the number of elements to iterate onpublic BaseOp(INDArray x)
x
- the ndarraypublic boolean isExecSpecial()
Op
isExecSpecial
in interface Op
public DataBuffer extraArgsDataBuff()
Op
extraArgsDataBuff
in interface Op
public Buffer extraArgsBuff()
Op
extraArgsBuff
in interface Op
public boolean isPassThrough()
Op
isPassThrough
in interface Op
public void setZ(INDArray z)
Op
public long n()
Op
public void init(INDArray x, INDArray y, INDArray z, long n)
Op
public void setN(long n)
Op
public long numProcessed()
Op
numProcessed
in interface Op
public void exec()
Op
Copyright © 2016. All Rights Reserved.