Package org.nd4j.linalg.api.ops
Class BaseReduceBoolOp
- 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.BaseReduceBoolOp
-
- All Implemented Interfaces:
Op,ReduceBoolOp,ReduceOp
public abstract class BaseReduceBoolOp extends BaseReduceOp implements ReduceBoolOp
-
-
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 Modifier Constructor Description protectedBaseReduceBoolOp()BaseReduceBoolOp(SameDiff sameDiff)BaseReduceBoolOp(SameDiff sameDiff, SDVariable i_v)BaseReduceBoolOp(SameDiff sameDiff, SDVariable i_v, boolean keepDims)protectedBaseReduceBoolOp(SameDiff sameDiff, SDVariable input, int... dimensions)protectedBaseReduceBoolOp(SameDiff sameDiff, SDVariable input, int[] dimensions, boolean keepDims)BaseReduceBoolOp(SameDiff sameDiff, SDVariable i_v, SDVariable i_v2)BaseReduceBoolOp(SameDiff sameDiff, SDVariable i_v, SDVariable dimensions, boolean keepDims)BaseReduceBoolOp(SameDiff sameDiff, SDVariable i_v, SDVariable i_v2, int[] dimensions)BaseReduceBoolOp(SameDiff sameDiff, SDVariable i_v, SDVariable i_v2, int[] dimensions, boolean keepDims)BaseReduceBoolOp(SameDiff sameDiff, SDVariable i_v, SDVariable i_v2, SDVariable dimensions)BaseReduceBoolOp(INDArray x, boolean keepDims, int... dimensions)BaseReduceBoolOp(INDArray x, int... dimensions)BaseReduceBoolOp(INDArray x, INDArray z, boolean keepDims, int[] dimensions)BaseReduceBoolOp(INDArray x, INDArray z, int... dimensions)BaseReduceBoolOp(INDArray x, INDArray y, INDArray z, boolean keepDims, int[] dimensions)BaseReduceBoolOp(INDArray x, INDArray y, INDArray z, int... dimensions)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description List<DataType>calculateOutputDataTypes(List<DataType> dataTypes)Calculate the data types for the output arrays.List<LongShapeDescriptor>calculateOutputShape()Calculate the output shape for this opList<LongShapeDescriptor>calculateOutputShape(OpContext oc)abstract booleanemptyValue()Op.TypegetOpType()Op.TypeopType()The type of the opDataTyperesultType()This method returns datatype for result array wrt given inputsDataTyperesultType(OpContext oc)booleanvalidateDataTypes(OpContext oc)-
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, onnxName, outputVariables, setX, setY, setZ, tensorflowName, 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
-
BaseReduceBoolOp
public BaseReduceBoolOp(SameDiff sameDiff, SDVariable i_v, SDVariable i_v2, int[] dimensions)
-
BaseReduceBoolOp
public BaseReduceBoolOp(SameDiff sameDiff, SDVariable i_v, boolean keepDims)
-
BaseReduceBoolOp
public BaseReduceBoolOp(SameDiff sameDiff, SDVariable i_v, SDVariable dimensions, boolean keepDims)
-
BaseReduceBoolOp
public BaseReduceBoolOp(SameDiff sameDiff, SDVariable i_v, SDVariable i_v2)
-
BaseReduceBoolOp
protected BaseReduceBoolOp(SameDiff sameDiff, SDVariable input, int[] dimensions, boolean keepDims)
-
BaseReduceBoolOp
public BaseReduceBoolOp(SameDiff sameDiff, SDVariable i_v, SDVariable i_v2, int[] dimensions, boolean keepDims)
-
BaseReduceBoolOp
public BaseReduceBoolOp(SameDiff sameDiff, SDVariable i_v)
-
BaseReduceBoolOp
protected BaseReduceBoolOp(SameDiff sameDiff, SDVariable input, int... dimensions)
-
BaseReduceBoolOp
public BaseReduceBoolOp(INDArray x, INDArray z, boolean keepDims, int[] dimensions)
-
BaseReduceBoolOp
public BaseReduceBoolOp(INDArray x, int... dimensions)
-
BaseReduceBoolOp
public BaseReduceBoolOp(INDArray x, boolean keepDims, int... dimensions)
-
BaseReduceBoolOp
public BaseReduceBoolOp(SameDiff sameDiff)
-
BaseReduceBoolOp
public BaseReduceBoolOp(SameDiff sameDiff, SDVariable i_v, SDVariable i_v2, SDVariable dimensions)
-
BaseReduceBoolOp
protected BaseReduceBoolOp()
-
-
Method Detail
-
opType
public Op.Type opType()
Description copied from class:DifferentialFunctionThe type of the op- Overrides:
opTypein classDifferentialFunction- Returns:
-
resultType
public DataType resultType()
Description copied from interface:ReduceOpThis method returns datatype for result array wrt given inputs- Specified by:
resultTypein interfaceReduceOp- Returns:
-
resultType
public DataType resultType(OpContext oc)
- Specified by:
resultTypein interfaceReduceOp
-
validateDataTypes
public boolean validateDataTypes(OpContext oc)
- Specified by:
validateDataTypesin interfaceReduceOp
-
calculateOutputShape
public List<LongShapeDescriptor> calculateOutputShape()
Description copied from class:DifferentialFunctionCalculate the output shape for this op- Specified by:
calculateOutputShapein classBaseReduceOp- Returns:
- List of output shape descriptors
-
calculateOutputShape
public List<LongShapeDescriptor> calculateOutputShape(OpContext oc)
- Overrides:
calculateOutputShapein classDifferentialFunction
-
calculateOutputDataTypes
public List<DataType> calculateOutputDataTypes(List<DataType> dataTypes)
Description copied from class:DifferentialFunctionCalculate 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:
calculateOutputDataTypesin classDifferentialFunction- Parameters:
dataTypes- The data types of the inputs- Returns:
- The data types of the outputs
-
emptyValue
public abstract boolean emptyValue()
-
-