Table of Contents

Class LowRankFactorizationMetadata<T>

Namespace
AiDotNet.ModelCompression
Assembly
AiDotNet.dll

Metadata for Low-Rank Factorization compression.

public class LowRankFactorizationMetadata<T> : ICompressionMetadata<T>

Type Parameters

T

The numeric type.

Inheritance
LowRankFactorizationMetadata<T>
Implements
Inherited Members

Remarks

For Beginners: This metadata stores: - Matrix dimensions (how the vector was reshaped) - Rank used (how many singular values kept) - Original length (for reconstruction)

Constructors

LowRankFactorizationMetadata(int, int, int, int)

Initializes a new instance of the LowRankFactorizationMetadata class.

public LowRankFactorizationMetadata(int rows, int cols, int rank, int originalLength)

Parameters

rows int
cols int
rank int
originalLength int

Properties

Cols

Gets the number of columns in the reshaped matrix.

public int Cols { get; }

Property Value

int

OriginalLength

Gets the original length of the weights array.

public int OriginalLength { get; }

Property Value

int

Rank

Gets the rank of the factorization.

public int Rank { get; }

Property Value

int

Rows

Gets the number of rows in the reshaped matrix.

public int Rows { get; }

Property Value

int

Type

Gets the compression type.

public CompressionType Type { get; }

Property Value

CompressionType

Methods

GetMetadataSize()

Gets the size in bytes of this metadata structure.

public long GetMetadataSize()

Returns

long