Class BroadcastGradientArgs
- java.lang.Object
-
- org.nd4j.autodiff.functions.DifferentialFunction
-
- org.nd4j.linalg.api.ops.BaseOp
-
- org.nd4j.linalg.api.ops.BaseBroadcastOp
-
- org.nd4j.linalg.api.ops.impl.broadcast.BroadcastGradientArgs
-
- All Implemented Interfaces:
BroadcastOp,Op
public class BroadcastGradientArgs extends BaseBroadcastOp
-
-
Field Summary
-
Fields inherited from class org.nd4j.linalg.api.ops.BaseBroadcastOp
dimension
-
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 BroadcastGradientArgs()BroadcastGradientArgs(SameDiff sameDiff, SDVariable i_v1, SDVariable i_v2, boolean inPlace, int[] dimension)BroadcastGradientArgs(SameDiff sameDiff, SDVariable i_v1, SDVariable i_v2, int[] dimension)BroadcastGradientArgs(SameDiff sameDiff, SDVariable i_v1, SDVariable i_v2, int[] dimension, Object[] extraArgs)BroadcastGradientArgs(INDArray x, INDArray y, INDArray z, int... dimension)
-
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.List<SDVariable>doDiff(List<SDVariable> f1)The actual implementation for automatic differentiation.StringopName()The name of the opintopNum()The number of the op (mainly for old legacy XYZ ops likeOp)-
Methods inherited from class org.nd4j.linalg.api.ops.BaseBroadcastOp
calculateOutputShape, getDimension, getOpType, initFromOnnx, initFromTensorFlow, opType, setDimension, validateDataTypes
-
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, calculateOutputShape, configFieldName, configureWithSameDiff, diff, dup, getBooleanFromProperty, getDoubleValueFromProperty, getIntValueFromProperty, getLongValueFromProperty, getStringFromProperty, getValue, isConfigProperties, larg, mappingsForFunction, onnxNames, outputs, outputVariable, outputVariables, outputVariablesNames, propertiesForFunction, rarg, replaceArg, setInstanceId, setPropertiesForFunction, 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.BroadcastOp
dimensions
-
Methods inherited from interface org.nd4j.linalg.api.ops.Op
clearArrays, extraArgs, extraArgsBuff, extraArgsDataBuff, setExtraArgs, setX, setY, setZ, toCustomOp, x, y, z
-
-
-
-
Constructor Detail
-
BroadcastGradientArgs
public BroadcastGradientArgs(SameDiff sameDiff, SDVariable i_v1, SDVariable i_v2, int[] dimension)
-
BroadcastGradientArgs
public BroadcastGradientArgs(SameDiff sameDiff, SDVariable i_v1, SDVariable i_v2, boolean inPlace, int[] dimension)
-
BroadcastGradientArgs
public BroadcastGradientArgs(SameDiff sameDiff, SDVariable i_v1, SDVariable i_v2, int[] dimension, Object[] extraArgs)
-
BroadcastGradientArgs
public BroadcastGradientArgs()
-
-
Method Detail
-
opNum
public int opNum()
Description copied from class:DifferentialFunctionThe number of the op (mainly for old legacy XYZ ops likeOp)- Specified by:
opNumin interfaceOp- Overrides:
opNumin classDifferentialFunction- Returns:
-
opName
public String opName()
Description copied from class:DifferentialFunctionThe name of the op- Specified by:
opNamein interfaceOp- Overrides:
opNamein classDifferentialFunction- Returns:
- the opName of this operation
-
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
-
doDiff
public List<SDVariable> doDiff(List<SDVariable> f1)
Description copied from class:DifferentialFunctionThe actual implementation for automatic differentiation.- Specified by:
doDiffin classDifferentialFunction- Returns:
-
-