Class RandomLayer
Represents the abstract base class for layers which generate random values in the output tensor.
Inherited Members
Namespace: Unity.Sentis.Layers
Syntax
[Serializable]
public abstract class RandomLayer : Layer
Constructors
RandomLayer(Nullable<Single>)
Declaration
protected RandomLayer(float? seed)
Parameters
| Type | Name | Description |
|---|---|---|
| Nullable<Single> | seed |
Fields
hasSeed
Whether the layer has a provided seed value for the random number generator.
Declaration
public bool hasSeed
Field Value
| Type | Description |
|---|---|
| Boolean |
seed
The seed value for the random number generator. The layer does not use this value if hasSeed is false.
Declaration
public float seed
Field Value
| Type | Description |
|---|---|
| Single |
Properties
NextSeed
Declaration
protected float NextSeed { get; }
Property Value
| Type | Description |
|---|---|
| Single |
Methods
ResetSeed()
Resets the state of the random number generator to its initial state.
If hasSeed is false then the random number generator is seeded by System.Random().
Declaration
public void ResetSeed()