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, zVertexIddimensions, 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, zarg, args, asProperties, attributeAdaptersForFunction, configFieldName, diff, doDiff, dup, f, getValue, hasPlaceHolderInputs, isConfigProperties, larg, mappingsForFunction, onnxName, onnxNames, opName, opNum, outputVariables, propertiesForFunction, rarg, resolvePropertiesFromSameDiffBeforeExecution, setInstanceId, setValueFor, tensorflowName, tensorflowNamesclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetOpTypeexec, exec, extraArgs, extraArgsBuff, extraArgsDataBuff, init, isExecSpecial, isPassThrough, n, numProcessed, opName, opNum, setExtraArgs, setN, setX, setY, setZ, toCustomOp, x, y, zprotected 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()
AccumulationnoOp in interface Accumulationpublic boolean isKeepDims()
AccumulationisKeepDims in interface Accumulationpublic List<int[]> calculateOutputShape()
DifferentialFunctioncalculateOutputShape in class DifferentialFunctionpublic void initFromTensorFlow(NodeDef nodeDef, SameDiff initWith, Map<String,AttrValue> attributesForNode, GraphDef graph)
DifferentialFunctionNodeDefinitFromTensorFlow in class BaseOpprotected boolean hasReductionIndices(NodeDef nodeDef)
public void initFromOnnx(OnnxProto3.NodeProto node, SameDiff initWith, Map<String,OnnxProto3.AttributeProto> attributesForNode, OnnxProto3.GraphProto graph)
DifferentialFunctionOnnxProto3.NodeProtoinitFromOnnx in class BaseOppublic void setFinalResult(double value)
AccumulationsetFinalResult in interface Accumulationpublic Number getFinalResult()
AccumulationgetFinalResult in interface Accumulationpublic double zeroDouble()
AccumulationzeroDouble in interface Accumulationpublic float zeroFloat()
AccumulationzeroFloat in interface Accumulationpublic float zeroHalf()
AccumulationzeroHalf in interface Accumulationpublic Op.Type opType()
DifferentialFunctionopType in class DifferentialFunctionpublic boolean isComplexAccumulation()
isComplexAccumulation in interface AccumulationCopyright © 2018. All rights reserved.