public class DefaultOpExecutioner extends Object implements OpExecutioner
OpExecutioner.ExecutionMode, OpExecutioner.ProfilingMode| Modifier and Type | Field and Description |
|---|---|
protected OpExecutioner.ExecutionMode |
executionMode |
protected OpExecutioner.ProfilingMode |
profilingMode |
| Constructor and Description |
|---|
DefaultOpExecutioner() |
| Modifier and Type | Method and Description |
|---|---|
INDArray |
bitmapDecode(INDArray encoded,
INDArray target) |
INDArray |
bitmapEncode(INDArray indArray,
double threshold) |
long |
bitmapEncode(INDArray indArray,
INDArray target,
double threshold)
This method returns number of elements affected by encoder
|
protected void |
checkForCompression(Op op) |
void |
commit()
This method ensures all operations that supposed to be executed at this moment, are executed and finished.
|
INDArray |
exec(Accumulation op,
int... dimension)
Execute an accumulation along one or more dimensions
|
void |
exec(Aggregate op) |
<T extends Aggregate> |
exec(Batch<T> batch)
This method executes previously built batch
|
INDArray |
exec(BroadcastOp broadcast,
int... dimension)
Execute an broadcast along one or more dimensions
|
void |
exec(GridOp op)
Execute GridOp
|
INDArray |
exec(IndexAccumulation op,
int... dimension)
Execute an index accumulation along one or more dimensions
|
void |
exec(List<Aggregate> batch)
This method takes abritrary sized list of aggregates, and packs them into batches
|
void |
exec(MetaOp op)
Execute MetaOp
|
Op |
exec(Op op)
Execute the operation
|
Op |
exec(Op op,
int... dimension)
Execute the operation along 1 or more dimensions
|
INDArray |
exec(RandomOp op)
This method executes specified RandomOp using default RNG available via Nd4j.getRandom()
|
INDArray |
exec(RandomOp op,
Random rng)
This method executes specific RandomOp against specified RNG
|
INDArray |
exec(Variance accumulation,
boolean biasCorrected,
int... dimension)
Execute an accumulation along one or more dimensions
|
Accumulation |
execAndReturn(Accumulation op)
Execute and return the result from an accumulation
|
INDArray |
execAndReturn(BroadcastOp op)
Execute and return the result from a vector op
|
IndexAccumulation |
execAndReturn(IndexAccumulation op)
Execute and return the result from an index accumulation
|
INDArray |
execAndReturn(Op op)
Execute and return a result
ndarray from the given op
|
INDArray |
execAndReturn(ScalarOp op)
Execute and return the result from a scalar op
|
INDArray |
execAndReturn(TransformOp op)
Execute a TransformOp and return the result
|
Accumulation |
execAndReturn(Variance op,
boolean biasCorrected)
Execute and return the result from an accumulation
|
OpExecutioner.ExecutionMode |
executionMode()
Get the execution mode for this
execuioner
|
Properties |
getEnvironmentInformation()
This method return set of key/value and key/key/value objects, describing current environment
|
String |
getLastOp()
This method returns name of the last invoked op
|
OpExecutioner.ProfilingMode |
getProfilingMode()
Ths method returns current profiling
|
TADManager |
getTADManager()
This method returns TADManager instance used for this OpExecutioner
|
protected void |
interceptIntDataType(Op op)
This method checks if any Op operand has data type of INT, and throws exception if any.
|
void |
iterateOverAllColumns(Op op)
Iterate over every column of every slice
|
void |
iterateOverAllRows(Op op)
Iterate over every row of every slice
|
void |
printEnvironmentInformation()
This method prints out environmental information returned by getEnvironmentInformation() method
|
long |
profilingHookIn(Op op) |
long |
profilingHookIn(Op op,
DataBuffer... tadBuffers) |
void |
profilingHookOut(Op op,
long timeStart) |
void |
push()
This method ensures all operations that supposed to be executed at this moment, are executed.
|
void |
setExecutionMode(OpExecutioner.ExecutionMode executionMode)
Set the execution mode
|
void |
setProfilingMode(OpExecutioner.ProfilingMode mode)
This method specifies desired profiling mode
|
INDArray |
thresholdDecode(INDArray encoded,
INDArray target)
This method decodes thresholds array, and puts it into target array
|
INDArray |
thresholdEncode(INDArray input,
double threshold)
This method encodes array as thresholds, updating input array at the same time
|
INDArray |
thresholdEncode(INDArray input,
double threshold,
Integer boundary)
This method encodes array as thresholds, updating input array at the same time
|
static void |
validateDataType(DataBuffer.Type expectedType,
INDArray... operands) |
static void |
validateDataType(DataBuffer.Type expectedType,
Op op)
Validate the data types
for the given operation
|
protected OpExecutioner.ProfilingMode profilingMode
protected OpExecutioner.ExecutionMode executionMode
protected void checkForCompression(Op op)
public String getLastOp()
OpExecutionergetLastOp in interface OpExecutionerprotected void interceptIntDataType(Op op)
op - public Op exec(Op op)
OpExecutionerexec in interface OpExecutionerop - the operation to executepublic INDArray execAndReturn(Op op)
OpExecutionerexecAndReturn in interface OpExecutionerop - the operation to executepublic void iterateOverAllRows(Op op)
OpExecutioneriterateOverAllRows in interface OpExecutionerop - the operation to applypublic void iterateOverAllColumns(Op op)
OpExecutioneriterateOverAllColumns in interface OpExecutionerop - the operation to applypublic INDArray execAndReturn(TransformOp op)
OpExecutionerexecAndReturn in interface OpExecutionerop - the operation to executepublic Accumulation execAndReturn(Accumulation op)
OpExecutionerexecAndReturn in interface OpExecutionerop - the operation to executepublic Accumulation execAndReturn(Variance op, boolean biasCorrected)
OpExecutionerexecAndReturn in interface OpExecutionerop - the operation to executepublic INDArray execAndReturn(ScalarOp op)
OpExecutionerexecAndReturn in interface OpExecutionerop - the operation to executepublic IndexAccumulation execAndReturn(IndexAccumulation op)
OpExecutionerexecAndReturn in interface OpExecutionerop - the index accumulation operation to executepublic INDArray execAndReturn(BroadcastOp op)
OpExecutionerexecAndReturn in interface OpExecutionerpublic Op exec(Op op, int... dimension)
OpExecutionerexec in interface OpExecutionerop - the operation to executepublic INDArray exec(Accumulation op, int... dimension)
OpExecutionerexec in interface OpExecutionerop - the accumulationdimension - the dimensionpublic INDArray exec(Variance accumulation, boolean biasCorrected, int... dimension)
OpExecutionerexec in interface OpExecutioneraccumulation - the accumulationdimension - the dimensionpublic INDArray exec(IndexAccumulation op, int... dimension)
OpExecutionerexec in interface OpExecutionerop - the index accumulation operationdimension - the dimension/s to execute alongpublic OpExecutioner.ExecutionMode executionMode()
OpExecutionerexecutionMode in interface OpExecutionerpublic void setExecutionMode(OpExecutioner.ExecutionMode executionMode)
OpExecutionersetExecutionMode in interface OpExecutionerexecutionMode - the execution modepublic INDArray exec(BroadcastOp broadcast, int... dimension)
OpExecutionerexec in interface OpExecutionerbroadcast - the accumulationdimension - the dimensionpublic void exec(MetaOp op)
OpExecutionerexec in interface OpExecutionerpublic void exec(GridOp op)
OpExecutionerexec in interface OpExecutionerpublic <T extends Aggregate> void exec(Batch<T> batch)
OpExecutionerexec in interface OpExecutionerpublic void exec(Aggregate op)
exec in interface OpExecutionerpublic void exec(List<Aggregate> batch)
OpExecutionerexec in interface OpExecutionerpublic INDArray exec(RandomOp op)
exec in interface OpExecutionerop - public INDArray exec(RandomOp op, Random rng)
exec in interface OpExecutionerop - rng - public void setProfilingMode(OpExecutioner.ProfilingMode mode)
OpExecutionersetProfilingMode in interface OpExecutionerpublic OpExecutioner.ProfilingMode getProfilingMode()
OpExecutionergetProfilingMode in interface OpExecutionerpublic long profilingHookIn(Op op, DataBuffer... tadBuffers)
public long profilingHookIn(Op op)
public void profilingHookOut(Op op, long timeStart)
public static void validateDataType(DataBuffer.Type expectedType, Op op)
expectedType - op - public static void validateDataType(DataBuffer.Type expectedType, INDArray... operands)
public TADManager getTADManager()
OpExecutionergetTADManager in interface OpExecutionerpublic Properties getEnvironmentInformation()
getEnvironmentInformation in interface OpExecutionerpublic void printEnvironmentInformation()
OpExecutionerprintEnvironmentInformation in interface OpExecutionerpublic void push()
OpExecutionerpush in interface OpExecutionerpublic void commit()
OpExecutionercommit in interface OpExecutionerpublic INDArray thresholdEncode(INDArray input, double threshold)
OpExecutionerthresholdEncode in interface OpExecutionerpublic INDArray thresholdEncode(INDArray input, double threshold, Integer boundary)
OpExecutionerthresholdEncode in interface OpExecutionerpublic INDArray thresholdDecode(INDArray encoded, INDArray target)
OpExecutionerthresholdDecode in interface OpExecutionerpublic long bitmapEncode(INDArray indArray, INDArray target, double threshold)
OpExecutionerbitmapEncode in interface OpExecutionerpublic INDArray bitmapEncode(INDArray indArray, double threshold)
bitmapEncode in interface OpExecutionerpublic INDArray bitmapDecode(INDArray encoded, INDArray target)
bitmapDecode in interface OpExecutionerCopyright © 2017. All rights reserved.