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
|
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()
OpisExecSpecial in interface Oppublic DataBuffer extraArgsDataBuff()
OpextraArgsDataBuff in interface Oppublic Buffer extraArgsBuff()
OpextraArgsBuff in interface Oppublic boolean isPassThrough()
OpisPassThrough in interface Oppublic void setZ(INDArray z)
Oppublic long n()
Oppublic void init(INDArray x, INDArray y, INDArray z, long n)
Oppublic void setN(long n)
Oppublic long numProcessed()
OpnumProcessed in interface Oppublic void exec()
OpCopyright © 2016. All Rights Reserved.