Show / Hide Table of Contents

Class RandomUniform

Initializer that generates tensors with a uniform distribution.

Inheritance
System.Object
BaseInitializer
RandomUniform
Inherited Members
BaseInitializer.Name
Namespace: SiaNet.Initializers
Assembly: SiaNet.dll
Syntax
public class RandomUniform : BaseInitializer

Constructors

| Improve this Doc View Source

RandomUniform(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 Source

MaxVal

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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 Source

Generate(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
Overrides
BaseInitializer.Generate(Int64[])

See Also

BaseInitializer
  • Improve this Doc
  • View Source
Back to top Generated by DocFX