Package org.nd4j.linalg.api.ops
Class DynamicCustomOp.DynamicCustomOpsBuilder
- java.lang.Object
-
- org.nd4j.linalg.api.ops.DynamicCustomOp.DynamicCustomOpsBuilder
-
- Enclosing class:
- DynamicCustomOp
public static class DynamicCustomOp.DynamicCustomOpsBuilder extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected booleaninplaceAllowedprotected booleaninplaceCallprotected intnumBArgumentsprotected intnumIArgumentsprotected intnumInputsprotected intnumOutputsprotected intnumSArgumentsprotected intnumTArgumentsprotected longopHashprotected StringopNameprotected List<LongShapeDescriptor>outputShapes
-
Constructor Summary
Constructors Modifier Constructor Description protectedDynamicCustomOpsBuilder(String opName, long hash, int numInputs, int numOutputs, boolean inplaceAllowed, int numTArguments, int numIArguments)protectedDynamicCustomOpsBuilder(String opName, long hash, int numInputs, int numOutputs, boolean inplaceAllowed, int numTArguments, int numIArguments, int numSArguments)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DynamicCustomOp.DynamicCustomOpsBuilderaddBooleanArguments(boolean... bargs)This method takes arbitrary number of Integer arguments for op, Note that this ACCUMULATES arguments.DynamicCustomOp.DynamicCustomOpsBuilderaddFloatingPointArguments(Double... targs)This method takes arbitrary number of Double arguments for op, Note that this ACCUMULATES arguments.DynamicCustomOp.DynamicCustomOpsBuilderaddInputs(INDArray... inputs)This method takes arbitrary number of input INDArrays in, as Op input Note that this ACCUMULATES arguments.DynamicCustomOp.DynamicCustomOpsBuilderaddIntegerArguments(int... iargs)This method takes arbitrary number of Integer arguments for op, Note that this ACCUMULATES arguments.DynamicCustomOp.DynamicCustomOpsBuilderaddIntegerArguments(long arg)This method takes arbitrary number of Integer arguments for op, Note that this ACCUMULATES arguments.DynamicCustomOp.DynamicCustomOpsBuilderaddIntegerArguments(List<Integer> iargs)This method takes arbitrary number of Integer arguments for op, Note that this ACCUMULATES arguments.DynamicCustomOp.DynamicCustomOpsBuilderaddOutputs(INDArray... outputs)This method takes arbitrary number of output INDArrays in, to store operation result Note that this ACCUMULATES arguments.DynamicCustomOp.DynamicCustomOpsBuilderaddOutputShape(LongShapeDescriptor shape)Adds an oupDynamicCustomOp.DynamicCustomOpsBuilderaddStringArguments(String arg)This method takes arbitrary number of String arguments for op, Note that this ACCUMULATES arguments.DynamicCustomOp.DynamicCustomOpsBuilderaddStringArguments(String... sArgs)This method takes arbitrary number of String arguments for op, Note that this ACCUMULATES arguments.DynamicCustomOp.DynamicCustomOpsBuilderaddStringArguments(List<String> sArgs)This method takes arbitrary number of String arguments for op, Note that this ACCUMULATES arguments.DynamicCustomOpbuild()DynamicCustomOp.DynamicCustomOpsBuildercallInplace(boolean reallyCall)Whether an op call is in place or not.intgetNumOutputs()
-
-
-
Field Detail
-
opName
protected String opName
-
numInputs
protected int numInputs
-
numOutputs
protected int numOutputs
-
numTArguments
protected int numTArguments
-
numIArguments
protected int numIArguments
-
numBArguments
protected int numBArguments
-
numSArguments
protected int numSArguments
-
inplaceCall
protected boolean inplaceCall
-
inplaceAllowed
protected boolean inplaceAllowed
-
opHash
protected long opHash
-
outputShapes
protected List<LongShapeDescriptor> outputShapes
-
-
Constructor Detail
-
DynamicCustomOpsBuilder
protected DynamicCustomOpsBuilder(String opName, long hash, int numInputs, int numOutputs, boolean inplaceAllowed, int numTArguments, int numIArguments)
-
DynamicCustomOpsBuilder
protected DynamicCustomOpsBuilder(String opName, long hash, int numInputs, int numOutputs, boolean inplaceAllowed, int numTArguments, int numIArguments, int numSArguments)
-
-
Method Detail
-
addInputs
public DynamicCustomOp.DynamicCustomOpsBuilder addInputs(INDArray... inputs)
This method takes arbitrary number of input INDArrays in, as Op input Note that this ACCUMULATES arguments. You are able to call this method multiple times and it will add arguments to a list. PLEASE NOTE: this method does NOT validate lengths/shapes.- Parameters:
inputs-- Returns:
-
addOutputs
public DynamicCustomOp.DynamicCustomOpsBuilder addOutputs(INDArray... outputs)
This method takes arbitrary number of output INDArrays in, to store operation result Note that this ACCUMULATES arguments. You are able to call this method multiple times and it will add arguments to a list. PLEASE NOTE: this method does NOT validate lengths/shapes.- Parameters:
outputs-- Returns:
-
callInplace
public DynamicCustomOp.DynamicCustomOpsBuilder callInplace(boolean reallyCall)
Whether an op call is in place or not.- Parameters:
reallyCall-- Returns:
-
addIntegerArguments
public DynamicCustomOp.DynamicCustomOpsBuilder addIntegerArguments(List<Integer> iargs)
This method takes arbitrary number of Integer arguments for op, Note that this ACCUMULATES arguments. You are able to call this method multiple times and it will add arguments to a list. PLEASE NOTE: this method does NOT validate values.- Parameters:
iargs-- Returns:
-
addStringArguments
public DynamicCustomOp.DynamicCustomOpsBuilder addStringArguments(List<String> sArgs)
This method takes arbitrary number of String arguments for op, Note that this ACCUMULATES arguments. You are able to call this method multiple times and it will add arguments to a list. PLEASE NOTE: this method does NOT validate values.- Parameters:
sArgs-- Returns:
-
addStringArguments
public DynamicCustomOp.DynamicCustomOpsBuilder addStringArguments(String arg)
This method takes arbitrary number of String arguments for op, Note that this ACCUMULATES arguments. You are able to call this method multiple times and it will add arguments to a list. PLEASE NOTE: this method does NOT validate values.- Parameters:
arg-- Returns:
-
addStringArguments
public DynamicCustomOp.DynamicCustomOpsBuilder addStringArguments(String... sArgs)
This method takes arbitrary number of String arguments for op, Note that this ACCUMULATES arguments. You are able to call this method multiple times and it will add arguments to a list. PLEASE NOTE: this method does NOT validate values.- Parameters:
sArgs-- Returns:
-
addIntegerArguments
public DynamicCustomOp.DynamicCustomOpsBuilder addIntegerArguments(long arg)
This method takes arbitrary number of Integer arguments for op, Note that this ACCUMULATES arguments. You are able to call this method multiple times and it will add arguments to a list. PLEASE NOTE: this method does NOT validate values.- Parameters:
arg-- Returns:
-
addIntegerArguments
public DynamicCustomOp.DynamicCustomOpsBuilder addIntegerArguments(int... iargs)
This method takes arbitrary number of Integer arguments for op, Note that this ACCUMULATES arguments. You are able to call this method multiple times and it will add arguments to a list. PLEASE NOTE: this method does NOT validate values.- Parameters:
iargs-- Returns:
-
addBooleanArguments
public DynamicCustomOp.DynamicCustomOpsBuilder addBooleanArguments(boolean... bargs)
This method takes arbitrary number of Integer arguments for op, Note that this ACCUMULATES arguments. You are able to call this method multiple times and it will add arguments to a list. PLEASE NOTE: this method does NOT validate values.- Parameters:
bargs-- Returns:
-
addFloatingPointArguments
public DynamicCustomOp.DynamicCustomOpsBuilder addFloatingPointArguments(Double... targs)
This method takes arbitrary number of Double arguments for op, Note that this ACCUMULATES arguments. You are able to call this method multiple times and it will add arguments to a list. PLEASE NOTE: this method does NOT validate values.- Returns:
-
addOutputShape
public DynamicCustomOp.DynamicCustomOpsBuilder addOutputShape(LongShapeDescriptor shape)
Adds an oup- Parameters:
shape-- Returns:
-
build
public DynamicCustomOp build()
-
getNumOutputs
public int getNumOutputs()
-
-