Show / Hide Table of Contents

Class Parameter

Placeholder variable for holding weight and bias for the neural network. Attached with constraints and regularizer to easy apply them during optimizer update operations

Inheritance
System.Object
BaseParameter
Parameter
Inherited Members
BaseParameter.Data
BaseParameter.Grad
BaseParameter.Name
Namespace: SiaNet
Assembly: SiaNet.dll
Syntax
public class Parameter : BaseParameter

Constructors

| Improve this Doc View Source

Parameter(String, DataType, Int64[])

Initializes a new instance of the Parameter class.

Declaration
public Parameter(string name, DataType dataType, params long[] shape)
Parameters
Type Name Description
System.String name

The name of the parameter.

DataType dataType

Data type

System.Int64[] shape

The shape of weight/bias parameter.

| Improve this Doc View Source

Parameter(String, Int64[])

Initializes a new instance of the Parameter class.

Declaration
public Parameter(string name, params long[] shape)
Parameters
Type Name Description
System.String name

The name of the parameter.

System.Int64[] shape

The shape of the weight/bias parameter.

Properties

| Improve this Doc View Source

HaveRegularizer

Gets a value indicating whether the parameter have regularizer function attached.

Declaration
public bool HaveRegularizer { get; }
Property Value
Type Description
System.Boolean

true if [have regularizer]; otherwise, false.

Methods

| Improve this Doc View Source

ApplyConstraint()

Applies the constraint function to weight/bias during training.

Declaration
public void ApplyConstraint()
| Improve this Doc View Source

ApplyDeltaRegularizer()

Applies the gradient of regularizer function during back propagation.

Declaration
public void ApplyDeltaRegularizer()
| Improve this Doc View Source

ApplyRegularizer()

Applies the regularizer function to weight/bias during training.

Declaration
public float ApplyRegularizer()
Returns
Type Description
System.Single
| Improve this Doc View Source

Create(Tensor, String)

Create an instance of parameter with tensor data.

Declaration
public static Parameter Create(Tensor data, string name = "")
Parameters
Type Name Description
Tensor data

The tensor data to build the parameter.

System.String name

The name of the parameter.

Returns
Type Description
Parameter
| Improve this Doc View Source

SetConstraint(BaseConstraint)

Sets the constraint function.

Declaration
public void SetConstraint(BaseConstraint fn)
Parameters
Type Name Description
BaseConstraint fn

The function.

| Improve this Doc View Source

SetRegularizer(BaseRegularizer)

Sets the regularizer function.

Declaration
public void SetRegularizer(BaseRegularizer fn)
Parameters
Type Name Description
BaseRegularizer fn

The function.

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