LowerTriangularLinear¶
Bases: BaseModule
Linear layer with a lower-triangular weight, optionally extended with dense rows.
Designed to support in-place inference with a buffer of size
max(in_features, out_features):
- When
out <= inthe weight is lower triangular with the triangular block flush against the right edge. - When
out > inthe lastinrows are lower triangular (a square block) and the firstout - inrows are fully dense.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
in_features
|
int
|
Number of input features. |
required |
out_features
|
int
|
Number of output features. |
required |
bias
|
bool
|
Whether to include an additive bias term. |
True
|
device
|
str
|
Torch device for the parameters. |
'cpu'
|
act_func
|
str | None
|
Either |
None
|