public class CumSum extends DynamicCustomOp
DynamicCustomOp.DynamicCustomOpsBuilder, DynamicCustomOp.SameDiffBuilder
Modifier and Type | Field and Description |
---|---|
protected int[] |
axis |
protected boolean |
exclusive |
protected boolean |
reverse |
iArguments, inplaceCall, inputArguments, outputArguments, outputVariables, tArguments
dimensions, extraArgs, inPlace, sameDiff, scalarValue
Constructor and Description |
---|
CumSum() |
CumSum(INDArray in,
INDArray result,
boolean exclusive,
boolean reverse,
int... axis) |
CumSum(SameDiff sameDiff,
SDVariable x,
boolean exclusive,
boolean reverse,
int... axis) |
CumSum(SameDiff sameDiff,
SDVariable x,
int... axis) |
Modifier and Type | Method and Description |
---|---|
protected void |
addArgs() |
java.util.Map<java.lang.String,java.util.Map<java.lang.String,AttributeAdapter>> |
attributeAdaptersForFunction()
Returns the
AttributeAdapter s for each of the
possible ops for import (typically tensorflow and onnx)
See AttributeAdapter for more information on what the
adapter does. |
java.util.List<SDVariable> |
doDiff(java.util.List<SDVariable> grad)
The actual implementation for automatic differentiation.
|
void |
initFromOnnx(OnnxProto3.NodeProto node,
SameDiff initWith,
java.util.Map<java.lang.String,OnnxProto3.AttributeProto> attributesForNode,
OnnxProto3.GraphProto graph)
Iniitialize the function from the given
OnnxProto3.NodeProto |
void |
initFromTensorFlow(NodeDef nodeDef,
SameDiff initWith,
java.util.Map<java.lang.String,AttrValue> attributesForNode,
GraphDef graph)
Initialize the function from the given
NodeDef |
java.util.Map<java.lang.String,java.util.Map<java.lang.String,PropertyMapping>> |
mappingsForFunction()
Returns the mappings for a given function (
for tensorflow and onnx import mapping properties
of this function).
|
java.lang.String |
opName()
This method returns op opName as string
|
java.lang.String |
tensorflowName()
The opName of this function tensorflow
|
addIArgument, addIArgument, addInputArgument, addOutputArgument, addTArgument, asProperties, assertValidForExecution, builder, calculateOutputShape, getDescriptor, getIArgument, getInputArgument, getOutputArgument, getTArgument, iArgs, inputArguments, numIArguments, numInputArguments, numOutputArguments, numTArguments, onnxName, opHash, opNum, opType, outputArguments, outputVariables, outputVariables, populateInputsAndOutputsFromSameDiff, removeIArgument, removeInputArgument, removeOutputArgument, removeTArgument, sameDiffBuilder, setInputArgument, setOutputArgument, tArgs, toString
arg, arg, argNames, args, configFieldName, diff, dup, equals, f, getNumOutputs, getValue, hashCode, hasPlaceHolderInputs, isConfigProperties, larg, onnxNames, outputVariable, outputVariablesNames, propertiesForFunction, rarg, resolvePropertiesFromSameDiffBeforeExecution, setInstanceId, setValueFor, tensorflowNames
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isInplaceCall
protected boolean exclusive
protected boolean reverse
protected int[] axis
public CumSum()
public CumSum(SameDiff sameDiff, SDVariable x, int... axis)
public CumSum(SameDiff sameDiff, SDVariable x, boolean exclusive, boolean reverse, int... axis)
public java.lang.String opName()
DynamicCustomOp
opName
in interface CustomOp
opName
in class DynamicCustomOp
public java.lang.String tensorflowName()
DifferentialFunction
tensorflowName
in class DynamicCustomOp
public java.util.Map<java.lang.String,java.util.Map<java.lang.String,AttributeAdapter>> attributeAdaptersForFunction()
DifferentialFunction
AttributeAdapter
s for each of the
possible ops for import (typically tensorflow and onnx)
See AttributeAdapter
for more information on what the
adapter does.
Similar to DifferentialFunction.mappingsForFunction()
, the returned map
contains a AttributeAdapter
for each field name
when one is present. (It is optional for one to exist)_attributeAdaptersForFunction
in class DifferentialFunction
public java.util.Map<java.lang.String,java.util.Map<java.lang.String,PropertyMapping>> mappingsForFunction()
DifferentialFunction
mappingsForFunction
in class DifferentialFunction
public void initFromTensorFlow(NodeDef nodeDef, SameDiff initWith, java.util.Map<java.lang.String,AttrValue> attributesForNode, GraphDef graph)
DifferentialFunction
NodeDef
initFromTensorFlow
in class DynamicCustomOp
protected void addArgs()
public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, java.util.Map<java.lang.String,OnnxProto3.AttributeProto> attributesForNode, OnnxProto3.GraphProto graph)
DifferentialFunction
OnnxProto3.NodeProto
initFromOnnx
in class DynamicCustomOp
public java.util.List<SDVariable> doDiff(java.util.List<SDVariable> grad)
DifferentialFunction
doDiff
in class DynamicCustomOp