public abstract class BaseAccumulation extends BaseOp implements Accumulation
Modifier and Type | Field and Description |
---|---|
protected Number |
finalResult |
protected boolean |
isComplex |
protected boolean |
keepDims |
protected boolean |
newFormat |
extraArgs, extraArgz, n, numProcessed, passThrough, x, xVertexId, y, yVertexId, z, zVertexId
dimensions, inPlace, sameDiff, scalarValue
Constructor and Description |
---|
BaseAccumulation() |
BaseAccumulation(INDArray x) |
BaseAccumulation(INDArray x,
INDArray y) |
BaseAccumulation(INDArray x,
INDArray y,
INDArray z,
long n)
Initialize with the given
input, pairwise transform, result, and number
of elements
|
BaseAccumulation(INDArray x,
INDArray y,
long n) |
BaseAccumulation(SameDiff sameDiff) |
BaseAccumulation(SameDiff sameDiff,
SDVariable i_v) |
BaseAccumulation(SameDiff sameDiff,
SDVariable i_v,
int[] dimensions) |
BaseAccumulation(SameDiff sameDiff,
SDVariable i_v,
int[] dimensions,
boolean keepDims) |
BaseAccumulation(SameDiff sameDiff,
SDVariable i_v,
SDVariable i_v2,
int[] dimensions) |
BaseAccumulation(SameDiff sameDiff,
SDVariable i_v,
SDVariable i_v2,
int[] dimensions,
boolean keepDims) |
Modifier and Type | Method and Description |
---|---|
List<int[]> |
calculateOutputShape()
Calculate
the output shape for this op
|
Number |
getFinalResult()
Get the final result (may return null if getAndSetFinalResult has not
been called, or for accumulation ops on complex arrays)
|
protected boolean |
hasReductionIndices(NodeDef nodeDef) |
void |
initFromOnnx(OnnxProto3.NodeProto node,
SameDiff initWith,
Map<String,OnnxProto3.AttributeProto> attributesForNode,
OnnxProto3.GraphProto graph)
Iniitialize the function from the given
OnnxProto3.NodeProto |
void |
initFromTensorFlow(NodeDef nodeDef,
SameDiff initWith,
Map<String,AttrValue> attributesForNode,
GraphDef graph)
Initialize the function from the given
NodeDef |
boolean |
isComplexAccumulation() |
boolean |
isKeepDims()
This method returns TRUE if we're going to keep axis, FALSE otherwise
|
INDArray |
noOp()
Returns the no op version
of the input
Basically when a reduce can't happen (eg: sum(0) on a row vector)
you have a no op state for a given reduction.
|
Op.Type |
opType()
The type of the op
|
void |
setFinalResult(double value)
Get the final result (may return null if getAndSetFinalResult has not
been called, or for accumulation ops on complex arrays)
|
double |
zeroDouble()
Initial value (used to initialize the accumulation op)
|
float |
zeroFloat()
Initial value (used to initialize the accumulation op)
|
float |
zeroHalf()
Initial value for half
|
equals, exec, exec, extraArgs, extraArgsBuff, extraArgsDataBuff, getOpType, hashCode, init, isExecSpecial, isPassThrough, n, numProcessed, outputVariables, setN, setX, setY, setZ, toCustomOp, toString, x, y, z
arg, args, asProperties, attributeAdaptersForFunction, configFieldName, diff, doDiff, dup, f, getValue, hasPlaceHolderInputs, isConfigProperties, larg, mappingsForFunction, onnxName, onnxNames, opName, opNum, outputVariables, propertiesForFunction, rarg, resolvePropertiesFromSameDiffBeforeExecution, setInstanceId, setValueFor, tensorflowName, tensorflowNames
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getOpType
exec, exec, extraArgs, extraArgsBuff, extraArgsDataBuff, init, isExecSpecial, isPassThrough, n, numProcessed, opName, opNum, setExtraArgs, setN, setX, setY, setZ, toCustomOp, x, y, z
protected Number finalResult
protected boolean keepDims
protected boolean newFormat
protected boolean isComplex
public BaseAccumulation(SameDiff sameDiff, SDVariable i_v, int[] dimensions, boolean keepDims)
public BaseAccumulation(SameDiff sameDiff, SDVariable i_v, SDVariable i_v2, int[] dimensions, boolean keepDims)
public BaseAccumulation(SameDiff sameDiff, SDVariable i_v)
public BaseAccumulation(SameDiff sameDiff, SDVariable i_v, int[] dimensions)
public BaseAccumulation(SameDiff sameDiff, SDVariable i_v, SDVariable i_v2, int[] dimensions)
public BaseAccumulation()
public BaseAccumulation(INDArray x, INDArray y, INDArray z, long n)
x
- the inputy
- the pairwise transformz
- the resultn
- the number of elementspublic BaseAccumulation(INDArray x)
public BaseAccumulation(SameDiff sameDiff)
public INDArray noOp()
Accumulation
noOp
in interface Accumulation
public boolean isKeepDims()
Accumulation
isKeepDims
in interface Accumulation
public List<int[]> calculateOutputShape()
DifferentialFunction
calculateOutputShape
in class DifferentialFunction
public void initFromTensorFlow(NodeDef nodeDef, SameDiff initWith, Map<String,AttrValue> attributesForNode, GraphDef graph)
DifferentialFunction
NodeDef
initFromTensorFlow
in class BaseOp
protected boolean hasReductionIndices(NodeDef nodeDef)
public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map<String,OnnxProto3.AttributeProto> attributesForNode, OnnxProto3.GraphProto graph)
DifferentialFunction
OnnxProto3.NodeProto
initFromOnnx
in class BaseOp
public void setFinalResult(double value)
Accumulation
setFinalResult
in interface Accumulation
public Number getFinalResult()
Accumulation
getFinalResult
in interface Accumulation
public double zeroDouble()
Accumulation
zeroDouble
in interface Accumulation
public float zeroFloat()
Accumulation
zeroFloat
in interface Accumulation
public float zeroHalf()
Accumulation
zeroHalf
in interface Accumulation
public Op.Type opType()
DifferentialFunction
opType
in class DifferentialFunction
public boolean isComplexAccumulation()
isComplexAccumulation
in interface Accumulation
Copyright © 2018. All rights reserved.