Class RandomUniform
Initializer that generates tensors with a uniform distribution.
Inherited Members
Namespace: SiaNet.Initializers
Assembly: SiaNet.dll
Syntax
public class RandomUniform : BaseInitializer
Constructors
| Improve this Doc View SourceRandomUniform(Single, Single, Nullable<Int32>)
Initializes a new instance of the RandomUniform class.
Declaration
public RandomUniform(float minval = 0F, float maxval = 0.05F, int? seed = default(int? ))
Parameters
Type | Name | Description |
---|---|---|
System.Single | minval | Lower bound of the range of random values to generate. |
System.Single | maxval | Upper bound of the range of random values to generate. |
System.Nullable<System.Int32> | seed | Used to seed the random generator. |
Properties
| Improve this Doc View SourceMaxVal
Upper bound of the range of random values to generate.
Declaration
public float MaxVal { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The maximum value. |
MinVal
Lower bound of the range of random values to generate.
Declaration
public float MinVal { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The minimum value. |
Seed
Used to seed the random generator.
Declaration
public int? Seed { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> | The seed. |
Methods
| Improve this Doc View SourceGenerate(Int64[])
Generates a tensor with specified shape.
Declaration
public override Tensor Generate(params long[] shape)
Parameters
Type | Name | Description |
---|---|---|
System.Int64[] | shape | The shape of the tensor. |
Returns
Type | Description |
---|---|
Tensor |