Skip to content

cylinder_min_based_geometric_compression

Bases: cylinder_patch_based_geometric_compression

The cylinder patch and min metric based geometric compression function.

It performs the data compression based on sphere geometric patch shapes and provided min metric. This class inherits from the cylinder_patch_based_geometric_compression class, and only redefines the initialization method.

...

Attributes:

Name Type Description
name str, default = 'cylinder_min_based_geometric_compression'

Name of the compression function.

Methods:

Name Description
__init__

It performs the initialization of the cylinder compression function based on the min metric.

Source code in tinybig/compression/geometric_compression.py
class cylinder_min_based_geometric_compression(cylinder_patch_based_geometric_compression):
    """
        The cylinder patch and min metric based geometric compression function.

        It performs the data compression based on sphere geometric patch shapes and provided min metric.
        This class inherits from the cylinder_patch_based_geometric_compression class, and only redefines the initialization method.

        ...

        Attributes
        ----------
        name: str, default = 'cylinder_min_based_geometric_compression'
            Name of the compression function.

        Methods
        ----------
        __init__
            It performs the initialization of the cylinder compression function based on the min metric.
    """
    def __init__(self, name: str = 'cylinder_min_based_geometric_compression', metric: Callable[[torch.Tensor], torch.Tensor] = None, *args, **kwargs):
        """
            The initialization method of the cylinder patch and min metric based geometric compression function.

            It initializes the cylinder compression function with the min compression metric.

            Parameters
            ----------
            name: str, default = 'cylinder_min_based_geometric_compression'
                Name of the cylinder min compression function.

            Returns
            ----------
            transformation
                The cylinder min geometric compression function.
        """
        super().__init__(name=name, metric=batch_min, *args, **kwargs)

__init__(name='cylinder_min_based_geometric_compression', metric=None, *args, **kwargs)

The initialization method of the cylinder patch and min metric based geometric compression function.

It initializes the cylinder compression function with the min compression metric.

Parameters:

Name Type Description Default
name str

Name of the cylinder min compression function.

'cylinder_min_based_geometric_compression'

Returns:

Type Description
transformation

The cylinder min geometric compression function.

Source code in tinybig/compression/geometric_compression.py
def __init__(self, name: str = 'cylinder_min_based_geometric_compression', metric: Callable[[torch.Tensor], torch.Tensor] = None, *args, **kwargs):
    """
        The initialization method of the cylinder patch and min metric based geometric compression function.

        It initializes the cylinder compression function with the min compression metric.

        Parameters
        ----------
        name: str, default = 'cylinder_min_based_geometric_compression'
            Name of the cylinder min compression function.

        Returns
        ----------
        transformation
            The cylinder min geometric compression function.
    """
    super().__init__(name=name, metric=batch_min, *args, **kwargs)