Class Multinomial
Represents a Multinomial
random layer. This generates an output tensor with values from a multinomial distribution according to the probabilities given by the input tensor.
Inherited Members
Namespace: Unity.Sentis.Layers
Syntax
[Serializable]
public class Multinomial : RandomLayer
Constructors
Multinomial(String, String, Int32, Nullable<Single>)
Initializes and returns an instance of Multinomial
random layer.
Declaration
public Multinomial(string name, string input, int count, float? seed)
Parameters
Type | Name | Description |
---|---|---|
String | name | The name to use for the output tensor of the layer. |
String | input | The name to use for the probabilities tensor of the layer. |
Int32 | count | The number of times to sample the input. |
Nullable<Single> | seed | The optional seed to use for the random number generation. If this is |
Fields
count
The number of times to sample the input.
Declaration
public int count
Field Value
Type | Description |
---|---|
Int32 |
Methods
Execute(Tensor[], ExecutionContext)
Executes the layer using the operations and variables from the ExecutionContext
and returns the output tensor.
If the layer has more than one output, output tensors are saved to variables.
Declaration
public override Tensor Execute(Tensor[] inputTensors, ExecutionContext ctx)
Parameters
Type | Name | Description |
---|---|---|
Tensor[] | inputTensors | |
ExecutionContext | ctx |
Returns
Type | Description |
---|---|
Tensor |
Overrides
ToString()
Returns a string that represents the Layer
.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |