Skip to content

naive_exponential_probabilistic_compression

Bases: naive_probabilistic_compression

Source code in tinybig/compression/probabilistic_compression.py
class naive_exponential_probabilistic_compression(naive_probabilistic_compression):
    def __init__(self, name: str = 'naive_exponential_probabilistic_compression', rate: float = 0.5, require_normalization: bool = True,  *args, **kwargs):
        distribution_function = torch.distributions.exponential.Exponential(rate=torch.tensor([rate]))
        super().__init__(name=name, distribution_function=distribution_function, require_normalization=True,  *args, **kwargs)