public class Moments extends DynamicCustomOp
DynamicCustomOp.DynamicCustomOpsBuilder
axis, bArguments, dArguments, iArguments, inplaceCall, inputArguments, outputArguments, outputVariables, sArguments, tArguments
dimensions, extraArgs, inPlace, ownName, ownNameSetWithDefault, sameDiff, scalarValue
Constructor and Description |
---|
Moments() |
Moments(@NonNull INDArray input,
boolean keepDims,
int... dimensions) |
Moments(INDArray input,
INDArray axes,
boolean keepDims) |
Moments(INDArray in,
INDArray outMean,
INDArray outStd,
int... axes) |
Moments(@NonNull INDArray input,
int... dimensions) |
Moments(INDArray input,
int[] axes,
boolean keepDims) |
Moments(SameDiff sameDiff,
SDVariable input) |
Moments(SameDiff sameDiff,
SDVariable input,
int[] axes) |
Moments(SameDiff sd,
SDVariable input,
int[] axes,
boolean keepDims) |
Moments(SameDiff sd,
SDVariable input,
SDVariable axes,
boolean keepDims) |
Modifier and Type | Method and Description |
---|---|
protected void |
addArgs() |
List<DataType> |
calculateOutputDataTypes(List<DataType> dataTypes)
Calculate the data types for the output arrays.
|
List<SDVariable> |
doDiff(List<SDVariable> grad)
The actual implementation for automatic differentiation.
|
void |
initFromTensorFlow(NodeDef nodeDef,
SameDiff initWith,
Map<String,AttrValue> attributesForNode,
GraphDef graph)
Initialize the function from the given
NodeDef |
String |
opName()
This method returns op opName as string
|
Map<String,Object> |
propertiesForFunction()
Returns the properties for a given function
|
addBArgument, addDArgument, addIArgument, addIArgument, addInputArgument, addOutputArgument, addSArgument, addTArgument, assertValidForExecution, bArgs, builder, calculateOutputShape, calculateOutputShape, clearArrays, computeArrays, configureFromArguments, dArgs, generateFake, generateFake, getBArgument, getDescriptor, getIArgument, getInputArgument, getOutputArgument, getSArgument, getTArgument, getValue, iArgs, initFromOnnx, inputArguments, mappingsForFunction, numBArguments, numDArguments, numIArguments, numInputArguments, numOutputArguments, numSArguments, numTArguments, onnxName, opHash, opNum, opType, outputArguments, outputVariables, outputVariables, removeIArgument, removeInputArgument, removeOutputArgument, removeSArgument, removeTArgument, sArgs, setInputArgument, setInputArguments, setOutputArgument, setPropertiesForFunction, setValueFor, tArgs, tensorflowName, toString, wrapFilterNull, wrapOrNull, wrapOrNull
arg, arg, argNames, args, attributeAdaptersForFunction, configFieldName, configureWithSameDiff, diff, dup, equals, getBooleanFromProperty, getDoubleValueFromProperty, getIntValueFromProperty, getLongValueFromProperty, getNumOutputs, getStringFromProperty, hashCode, isConfigProperties, larg, onnxNames, outputs, outputVariable, outputVariablesNames, rarg, replaceArg, setInstanceId, tensorflowNames
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isInplaceCall
public Moments()
public Moments(@NonNull @NonNull INDArray input, boolean keepDims, int... dimensions)
public Moments(@NonNull @NonNull INDArray input, int... dimensions)
public Moments(SameDiff sameDiff, SDVariable input)
public Moments(SameDiff sameDiff, SDVariable input, int[] axes)
public Moments(INDArray input, int[] axes, boolean keepDims)
public Moments(SameDiff sd, SDVariable input, int[] axes, boolean keepDims)
public Moments(SameDiff sd, SDVariable input, SDVariable axes, boolean keepDims)
public void initFromTensorFlow(NodeDef nodeDef, SameDiff initWith, Map<String,AttrValue> attributesForNode, GraphDef graph)
DifferentialFunction
NodeDef
initFromTensorFlow
in class DynamicCustomOp
public String opName()
DynamicCustomOp
opName
in interface CustomOp
opName
in class DynamicCustomOp
public List<SDVariable> doDiff(List<SDVariable> grad)
DifferentialFunction
doDiff
in class DynamicCustomOp
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 inputspublic Map<String,Object> propertiesForFunction()
DifferentialFunction
propertiesForFunction
in class DynamicCustomOp
protected void addArgs()
Copyright © 2022. All rights reserved.