Class Constant
Initializer that generates tensors initialized to a constant value.
Inherited Members
Namespace: SiaNet.Initializers
Assembly: SiaNet.dll
Syntax
public class Constant : BaseInitializer
Constructors
| Improve this Doc View SourceConstant(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 SourceValue
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 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 |