extended_compression
Bases: extended_expansion
The extended data compression function.
It performs the data compression of multiple compression functions, and conctatnates their compressions to define wider compressions of the input data vector. This class inherits from the extended_expansion class.
...
Notes
Formally, given the \(n\) different compression functions (1) \(\kappa_1: {R}^{m} \to {R}^{d_1}\), (2) \(\kappa_2: {R}^{m} \to {R}^{d_2}\), \(\cdots\), (n) \(\kappa_n: {R}^{m} \to {R}^{d_{n}}\), we can represent their extended data compression function \(\kappa: {R}^{m} \to {R}^D\) as follows: $$ \begin{equation} \kappa(\mathbf{x}) = \left[ \kappa_1\left( \mathbf{x} \right), \kappa_2\left( \mathbf{x} \right), \cdots, \kappa_n\left( \mathbf{x} \right) \right] \in {R}^{D}, \end{equation} $$ where the compression output dimension \(D = \sum_{i=1}^n d_i\).
Attributes:
Name | Type | Description |
---|---|---|
name |
(str, optional)
|
The name of the nested compression function. Defaults to 'extended_compression'. |
Methods:
Name | Description |
---|---|
__init__ |
It performs the initialization of the compression function. |
Source code in tinybig/compression/extended_compression.py
__init__(name='extended_compression', *args, **kwargs)
The initialization method of the extended compression function.
It initializes an extended compression object based on the input function name. This method will also call the initialization method of the base class as well.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the nested compression function. Defaults to 'extended_compression'. |
'extended_compression'
|
Returns:
Type | Description |
---|---|
transformation
|
The extended data compression function. |