Show / Hide Table of Contents

Class Constant

Initializer that generates tensors initialized to a constant value.

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

Constructors

| Improve this Doc View Source

Constant(Single)

Initializes a new instance of the Constant class.

Declaration
public Constant(float value)
Parameters
Type Name Description
System.Single value

float; the value of the generator tensors.

Properties

| Improve this Doc View Source

Value

float; the value of the generator tensors.

Declaration
public float Value { get; set; }
Property Value
Type Description
System.Single

The value.

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