public class BernoulliDistribution extends BaseRandomOp
dataType, shape
dimensionz, extraArgz, x, xVertexId, y, yVertexId, z, zVertexId
dimensions, extraArgs, inPlace, ownName, ownNameSetWithDefault, sameDiff, scalarValue
Constructor and Description |
---|
BernoulliDistribution() |
BernoulliDistribution(double p,
DataType datatype,
long... shape) |
BernoulliDistribution(@NonNull INDArray z,
double prob)
This op fills Z with bernoulli trial results, so 0, or 1, depending by common probability
|
BernoulliDistribution(@NonNull INDArray z,
@NonNull INDArray prob)
This op fills Z with bernoulli trial results, so 0, or 1, each element will have it's own success probability defined in prob array
|
BernoulliDistribution(SameDiff sd,
double prob,
DataType dataType,
long[] shape) |
BernoulliDistribution(SameDiff sd,
double prob,
long[] shape) |
Modifier and Type | Method and Description |
---|---|
List<DataType> |
calculateOutputDataTypes(List<DataType> inputDataTypes)
Calculate the data types for the output arrays.
|
List<LongShapeDescriptor> |
calculateOutputShape()
Calculate the output shape for this op
|
List<LongShapeDescriptor> |
calculateOutputShape(OpContext oc) |
List<SDVariable> |
doDiff(List<SDVariable> f1)
The actual implementation for automatic differentiation.
|
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 ) |
String |
tensorflowName()
The opName of this function tensorflow
|
isInPlace, isTripleArgRngOp, opType
clearArrays, defineDimensions, dimensions, equals, extraArgs, extraArgsBuff, extraArgsDataBuff, getFinalResult, getInputArgument, getNumOutputs, getOpType, hashCode, initFromOnnx, initFromTensorFlow, outputVariables, setX, setY, setZ, toCustomOp, toString, x, y, z
arg, arg, argNames, args, attributeAdaptersForFunction, configFieldName, diff, dup, getValue, isConfigProperties, larg, mappingsForFunction, onnxNames, outputs, outputVariable, outputVariables, outputVariablesNames, propertiesForFunction, rarg, replaceArg, setInstanceId, setPropertiesForFunction, setValueFor, tensorflowNames
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
clearArrays, extraArgs, extraArgsBuff, extraArgsDataBuff, setExtraArgs, setX, setY, setZ, toCustomOp, x, y, z
public BernoulliDistribution(SameDiff sd, double prob, long[] shape)
public BernoulliDistribution(SameDiff sd, double prob, DataType dataType, long[] shape)
public BernoulliDistribution()
public BernoulliDistribution(double p, DataType datatype, long... shape)
public BernoulliDistribution(@NonNull @NonNull INDArray z, double prob)
z
- 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 String onnxName()
DifferentialFunction
public String tensorflowName()
DifferentialFunction
tensorflowName
in class BaseOp
public List<LongShapeDescriptor> calculateOutputShape(OpContext oc)
calculateOutputShape
in class DifferentialFunction
public List<LongShapeDescriptor> calculateOutputShape()
DifferentialFunction
calculateOutputShape
in class BaseRandomOp
public List<SDVariable> doDiff(List<SDVariable> f1)
DifferentialFunction
doDiff
in class DifferentialFunction
public List<DataType> calculateOutputDataTypes(List<DataType> inputDataTypes)
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 BaseRandomOp
inputDataTypes
- The data types of the inputsCopyright © 2021. All rights reserved.