public class Variance extends BaseReduceOp
Modifier and Type | Field and Description |
---|---|
protected double |
bias |
protected boolean |
biasCorrected |
protected double |
mean |
isComplex, isEmptyReduce, keepDims
dimensionz, extraArgz, x, xVertexId, y, yVertexId, z, zVertexId
dimensions, extraArgs, inPlace, sameDiff, scalarValue
Constructor and Description |
---|
Variance() |
Variance(boolean biasCorrected) |
Variance(INDArray x,
boolean biasCorrected,
int... dimensions) |
Variance(INDArray x,
INDArray z,
boolean biasCorrected,
boolean keepDims,
int... dimensions) |
Variance(INDArray x,
INDArray z,
boolean biasCorrected,
int... dimensions) |
Variance(INDArray x,
int... dimension) |
Variance(SameDiff sameDiff,
SDVariable i_v,
boolean biasCorrected,
boolean keepDims,
int[] dimensions) |
Modifier and Type | Method and Description |
---|---|
List<DataType> |
calculateOutputDataTypes(List<DataType> dataTypes)
Calculate the data types for the output arrays.
|
List<LongShapeDescriptor> |
calculateOutputShape()
Calculate the output shape for this op
|
List<SDVariable> |
doDiff(List<SDVariable> grad)
The actual implementation for automatic differentiation.
|
Op.Type |
getOpType() |
boolean |
isBiasCorrected() |
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.
|
String |
onnxName()
The opName of this function in onnx
|
String |
opName()
The name of the op
|
int |
opNum()
The number of the op (mainly for old legacy XYZ ops
like
Op ) |
Op.Type |
opType()
The type of the op
|
DataType |
resultType()
This method returns datatype for result array wrt given inputs
|
void |
setBiasCorrected(boolean biasCorrected) |
String |
tensorflowName()
The opName of this function tensorflow
|
boolean |
validateDataTypes() |
hasReductionIndices, initFromOnnx, initFromTensorFlow, isComplexAccumulation, isKeepDims, setDimensions
clearArrays, defineDimensions, dimensions, equals, extraArgs, extraArgsBuff, extraArgsDataBuff, getFinalResult, getInputArgument, getNumOutputs, getOpType, hashCode, outputVariables, setX, setY, setZ, toCustomOp, toString, x, y, z
arg, arg, argNames, args, attributeAdaptersForFunction, configFieldName, diff, dup, f, getValue, isConfigProperties, larg, mappingsForFunction, onnxNames, outputVariable, outputVariables, outputVariablesNames, propertiesForFunction, rarg, replaceArg, setInstanceId, setPropertiesForFunction, setValueFor, tensorflowNames
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
dimensions, getFinalResult
clearArrays, extraArgs, extraArgsBuff, extraArgsDataBuff, setExtraArgs, setX, setY, setZ, toCustomOp, x, y, z
protected double mean
protected double bias
protected boolean biasCorrected
public Variance(SameDiff sameDiff, SDVariable i_v, boolean biasCorrected, boolean keepDims, int[] dimensions)
public Variance()
public Variance(boolean biasCorrected)
public Variance(INDArray x, int... dimension)
public Variance(INDArray x, boolean biasCorrected, int... dimensions)
public INDArray noOp()
ReduceOp
noOp
in interface ReduceOp
noOp
in class BaseReduceOp
public int opNum()
DifferentialFunction
Op
)opNum
in interface Op
opNum
in class DifferentialFunction
public String opName()
DifferentialFunction
opName
in interface Op
opName
in class DifferentialFunction
public boolean isBiasCorrected()
public void setBiasCorrected(boolean biasCorrected)
public List<SDVariable> doDiff(List<SDVariable> grad)
DifferentialFunction
doDiff
in class DifferentialFunction
public String onnxName()
DifferentialFunction
public String tensorflowName()
DifferentialFunction
tensorflowName
in class BaseOp
public Op.Type getOpType()
public DataType resultType()
ReduceOp
public boolean validateDataTypes()
public List<LongShapeDescriptor> calculateOutputShape()
DifferentialFunction
calculateOutputShape
in class BaseReduceOp
public Op.Type opType()
DifferentialFunction
opType
in class DifferentialFunction
public List<DataType> calculateOutputDataTypes(List<DataType> dataTypes)
DifferentialFunction
DifferentialFunction.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.calculateOutputDataTypes
in class DifferentialFunction
dataTypes
- The data types of the inputsCopyright © 2019. All rights reserved.