Table of Contents

Class DeepCompressionMetadata<T>

Namespace
AiDotNet.ModelCompression
Assembly
AiDotNet.dll

Metadata for Deep Compression containing information from all three stages.

public class DeepCompressionMetadata<T> : ICompressionMetadata<T>

Type Parameters

T

The numeric type.

Inheritance
DeepCompressionMetadata<T>
Implements
Inherited Members

Constructors

DeepCompressionMetadata(SparsePruningMetadata<T>, WeightClusteringMetadata<T>, HuffmanEncodingMetadata<T>, int, DeepCompressionStats)

Initializes a new instance of the DeepCompressionMetadata class.

public DeepCompressionMetadata(SparsePruningMetadata<T> pruningMetadata, WeightClusteringMetadata<T> clusteringMetadata, HuffmanEncodingMetadata<T> huffmanMetadata, int originalLength, DeepCompressionStats compressionStats)

Parameters

pruningMetadata SparsePruningMetadata<T>
clusteringMetadata WeightClusteringMetadata<T>
huffmanMetadata HuffmanEncodingMetadata<T>
originalLength int
compressionStats DeepCompressionStats

Properties

ClusteringMetadata

Gets the metadata from Stage 2 (Weight Clustering/Quantization).

public WeightClusteringMetadata<T> ClusteringMetadata { get; }

Property Value

WeightClusteringMetadata<T>

CompressionStats

Gets the compression statistics.

public DeepCompressionStats CompressionStats { get; }

Property Value

DeepCompressionStats

HuffmanMetadata

Gets the metadata from Stage 3 (Huffman Encoding).

public HuffmanEncodingMetadata<T> HuffmanMetadata { get; }

Property Value

HuffmanEncodingMetadata<T>

OriginalLength

Gets the original length of the weights array.

public int OriginalLength { get; }

Property Value

int

PruningMetadata

Gets the metadata from Stage 1 (Pruning).

public SparsePruningMetadata<T> PruningMetadata { get; }

Property Value

SparsePruningMetadata<T>

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