Class BaseReduce3Op
- java.lang.Object
-
- org.nd4j.autodiff.functions.DifferentialFunction
-
- org.nd4j.linalg.api.ops.BaseOp
-
- org.nd4j.linalg.api.ops.BaseReduceOp
-
- org.nd4j.linalg.api.ops.BaseReduceFloatOp
-
- org.nd4j.linalg.api.ops.impl.reduce3.BaseReduce3Op
-
- All Implemented Interfaces:
Op
,ReduceFloatOp
,ReduceOp
- Direct Known Subclasses:
CosineDistance
,CosineSimilarity
,Dot
,EqualsWithEps
,EuclideanDistance
,HammingDistance
,JaccardDistance
,ManhattanDistance
public abstract class BaseReduce3Op extends BaseReduceFloatOp
-
-
Field Summary
-
Fields inherited from class org.nd4j.linalg.api.ops.BaseReduceOp
dimensionVariable, isComplex, isEmptyReduce, keepDims
-
Fields inherited from class org.nd4j.linalg.api.ops.BaseOp
dimensionz, extraArgz, x, xVertexId, y, yVertexId, z, zVertexId
-
Fields inherited from class org.nd4j.autodiff.functions.DifferentialFunction
dimensions, extraArgs, inPlace, ownName, ownNameSetWithDefault, sameDiff, scalarValue
-
-
Constructor Summary
Constructors Constructor Description BaseReduce3Op()
BaseReduce3Op(SameDiff sameDiff, SDVariable i_v, int[] dimensions)
BaseReduce3Op(SameDiff sameDiff, SDVariable i_v, SDVariable dimensions)
BaseReduce3Op(SameDiff sd, SDVariable x, SDVariable y, boolean keepDims, boolean isComplex, int[] dimensions)
BaseReduce3Op(SameDiff sameDiff, SDVariable i_v, SDVariable i_v2, int... dimensions)
BaseReduce3Op(SameDiff sameDiff, SDVariable i_v, SDVariable i_v2, SDVariable dimensions)
BaseReduce3Op(INDArray x, INDArray y, boolean allDistances, int... dimensions)
BaseReduce3Op(INDArray x, INDArray y, int... dimensions)
BaseReduce3Op(INDArray x, INDArray y, INDArray z)
BaseReduce3Op(INDArray x, INDArray y, INDArray z, boolean keepDims, boolean allDistances, int... dimensions)
BaseReduce3Op(INDArray x, INDArray y, INDArray z, boolean keepDims, int... dimensions)
BaseReduce3Op(INDArray x, INDArray y, INDArray z, int... dimensions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<DataType>
calculateOutputDataTypes(List<DataType> dataTypes)
Calculate the data types for the output arrays.Op.Type
getOpType()
String
onnxName()
The opName of this function in onnxOp.Type
opType()
The type of the opDataType
resultType()
This method returns datatype for result array wrt given inputsString
tensorflowName()
The opName of this function tensorflow-
Methods inherited from class org.nd4j.linalg.api.ops.BaseReduceFloatOp
calculateOutputShape, calculateOutputShape, resultType, validateDataTypes
-
Methods inherited from class org.nd4j.linalg.api.ops.BaseReduceOp
configureWithSameDiff, hasReductionIndices, initFromOnnx, initFromTensorFlow, isComplexAccumulation, isKeepDims, noOp, setDimensions, setPropertiesForFunction
-
Methods inherited from class org.nd4j.linalg.api.ops.BaseOp
clearArrays, computeVariables, defineDimensions, dimensions, equals, extraArgs, extraArgsBuff, extraArgsDataBuff, getFinalResult, getInputArgument, getNumOutputs, getOpType, hashCode, outputVariables, setX, setY, setZ, toCustomOp, toString, x, y, z
-
Methods inherited from class org.nd4j.autodiff.functions.DifferentialFunction
arg, arg, argNames, args, attributeAdaptersForFunction, configFieldName, diff, doDiff, dup, getBooleanFromProperty, getDoubleValueFromProperty, getIntValueFromProperty, getLongValueFromProperty, getStringFromProperty, getValue, isConfigProperties, larg, mappingsForFunction, onnxNames, opName, opNum, outputs, outputVariable, outputVariables, outputVariablesNames, propertiesForFunction, rarg, replaceArg, setInstanceId, setValueFor, tensorflowNames
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.nd4j.linalg.api.ops.Op
clearArrays, extraArgs, extraArgsBuff, extraArgsDataBuff, opName, opNum, setExtraArgs, setX, setY, setZ, toCustomOp, x, y, z
-
Methods inherited from interface org.nd4j.linalg.api.ops.ReduceOp
dimensions, getFinalResult, isComplexAccumulation, isKeepDims, noOp, setDimensions
-
-
-
-
Constructor Detail
-
BaseReduce3Op
public BaseReduce3Op(SameDiff sameDiff, SDVariable i_v, int[] dimensions)
-
BaseReduce3Op
public BaseReduce3Op(SameDiff sameDiff, SDVariable i_v, SDVariable i_v2, int... dimensions)
-
BaseReduce3Op
public BaseReduce3Op(SameDiff sameDiff, SDVariable i_v, SDVariable dimensions)
-
BaseReduce3Op
public BaseReduce3Op(SameDiff sameDiff, SDVariable i_v, SDVariable i_v2, SDVariable dimensions)
-
BaseReduce3Op
public BaseReduce3Op()
-
BaseReduce3Op
public BaseReduce3Op(INDArray x, INDArray y, boolean allDistances, int... dimensions)
-
BaseReduce3Op
public BaseReduce3Op(INDArray x, INDArray y, INDArray z, boolean keepDims, int... dimensions)
-
BaseReduce3Op
public BaseReduce3Op(INDArray x, INDArray y, INDArray z, boolean keepDims, boolean allDistances, int... dimensions)
-
BaseReduce3Op
public BaseReduce3Op(SameDiff sd, SDVariable x, SDVariable y, boolean keepDims, boolean isComplex, int[] dimensions)
-
-
Method Detail
-
opType
public Op.Type opType()
Description copied from class:DifferentialFunction
The type of the op- Overrides:
opType
in classBaseReduceFloatOp
- Returns:
-
getOpType
public Op.Type getOpType()
- Specified by:
getOpType
in interfaceReduceOp
- Overrides:
getOpType
in classBaseReduceFloatOp
-
onnxName
public String onnxName()
Description copied from class:DifferentialFunction
The opName of this function in onnx
-
tensorflowName
public String tensorflowName()
Description copied from class:DifferentialFunction
The opName of this function tensorflow- Overrides:
tensorflowName
in classBaseOp
- Returns:
-
resultType
public DataType resultType()
Description copied from interface:ReduceOp
This method returns datatype for result array wrt given inputs- Specified by:
resultType
in interfaceReduceOp
- Overrides:
resultType
in classBaseReduceFloatOp
- Returns:
-
calculateOutputDataTypes
public List<DataType> calculateOutputDataTypes(List<DataType> dataTypes)
Description copied from class:DifferentialFunction
Calculate the data types for the output arrays. Though datatypes can also be inferred fromDifferentialFunction.calculateOutputShape()
, this method differs in that it does not require the input arrays to be populated. This is important as it allows us to do greedy datatype inference for the entire net - even if arrays are not available.- Overrides:
calculateOutputDataTypes
in classBaseReduceFloatOp
- Parameters:
dataTypes
- The data types of the inputs- Returns:
- The data types of the outputs
-
-