public abstract class BaseScalarOp extends BaseOp implements ScalarOp
dimensionz, extraArgz, x, xVertexId, y, yVertexId, z, zVertexId
dimensions, extraArgs, inPlace, sameDiff, scalarValue
Constructor and Description |
---|
BaseScalarOp() |
BaseScalarOp(INDArray x,
INDArray y,
INDArray z,
Number num) |
BaseScalarOp(INDArray x,
INDArray z,
Number set) |
BaseScalarOp(INDArray x,
Number num) |
BaseScalarOp(SameDiff sameDiff,
SDVariable i_v,
Number scalar) |
BaseScalarOp(SameDiff sameDiff,
SDVariable i_v,
Number scalar,
boolean inPlace) |
BaseScalarOp(SameDiff sameDiff,
@NonNull SDVariable i_v,
Number scalar,
boolean inPlace,
Object[] extraArgs) |
BaseScalarOp(SameDiff sameDiff,
SDVariable i_v,
Number scalar,
Object[] extraArgs) |
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<LongShapeDescriptor> |
calculateOutputShape(OpContext oc) |
int[] |
getDimension() |
Op.Type |
getOpType() |
Op.Type |
opType()
The type of the op
|
INDArray |
scalar()
The normal scalar
|
void |
setDimension(int... dimension) |
void |
setScalar(INDArray scalar) |
void |
setScalar(Number scalar)
This method allows to set scalar
|
boolean |
validateDataTypes(boolean experimentalMode) |
INDArray |
z()
The resulting ndarray
|
clearArrays, defineDimensions, dimensions, equals, extraArgs, extraArgsBuff, extraArgsDataBuff, getFinalResult, getInputArgument, getNumOutputs, getOpType, hashCode, initFromOnnx, initFromTensorFlow, onnxName, outputVariables, setX, setY, setZ, tensorflowName, toCustomOp, toString, x, y
arg, arg, argNames, args, attributeAdaptersForFunction, configFieldName, diff, doDiff, dup, getValue, isConfigProperties, larg, mappingsForFunction, onnxNames, opName, opNum, outputs, outputVariable, outputVariables, outputVariablesNames, propertiesForFunction, rarg, replaceArg, setInstanceId, setPropertiesForFunction, setValueFor, tensorflowNames
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
dimensions
clearArrays, extraArgs, extraArgsBuff, extraArgsDataBuff, opName, opNum, setExtraArgs, setX, setY, setZ, toCustomOp, x, y
public BaseScalarOp()
public BaseScalarOp(SameDiff sameDiff, SDVariable i_v, Number scalar)
public BaseScalarOp(SameDiff sameDiff, SDVariable i_v, Number scalar, boolean inPlace)
public BaseScalarOp(SameDiff sameDiff, @NonNull @NonNull SDVariable i_v, Number scalar, boolean inPlace, Object[] extraArgs)
public BaseScalarOp(SameDiff sameDiff, SDVariable i_v, Number scalar, Object[] extraArgs)
public List<LongShapeDescriptor> calculateOutputShape()
DifferentialFunction
calculateOutputShape
in class DifferentialFunction
public List<LongShapeDescriptor> calculateOutputShape(OpContext oc)
calculateOutputShape
in class DifferentialFunction
public Op.Type opType()
DifferentialFunction
opType
in class DifferentialFunction
public void setScalar(Number scalar)
ScalarOp
public int[] getDimension()
getDimension
in interface ScalarOp
public void setDimension(int... dimension)
setDimension
in interface ScalarOp
public boolean validateDataTypes(boolean experimentalMode)
validateDataTypes
in interface ScalarOp
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 © 2020. All rights reserved.