5.7. Param

class Param(TensorLike)

Parameter is a place-holder for constant at modeling phase. Parameter has a shape but its data is undetermined at modeling phase.

Properties

attr

The declared attribute for parameter.

name

The name of this parameter

Methods

__init__()

Construct a new parameter.

property attr: int

The declared attribute for parameter.

Attributes include:

  • nonneg = 0

  • nonpos = 1

  • symmetric = 2

  • diag = 3

  • PSD = 4

  • NSD = 5

  • pos = 6

  • neg = 7

For example, if parameter is declared as PSD, this value is 16(1 << 4).

property name: str

The name of this parameter

__init__(name: str, *shape: int, **attr: bool)

Construct a new parameter.

param name:

Type: str

The name for new parameter.

param *shape:

Type: int

The parameter shape.

param **attr:

Type: bool

The attribute parameter has. Attributes include:

  • nonneg

  • nonpos

  • symmetric

  • diag

  • PSD

  • NSD

  • pos

  • neg