Skip to content

naive_laplace_probabilistic_compression

Bases: naive_probabilistic_compression

Source code in tinybig/compression/probabilistic_compression.py
class naive_laplace_probabilistic_compression(naive_probabilistic_compression):
    def __init__(self, name: str = 'naive_laplace_probabilistic_compression', loc: float = 0.0, scale: float = 1.0, *args, **kwargs):
        distribution_function = torch.distributions.laplace.Laplace(torch.tensor([loc]), torch.tensor([scale]))
        super().__init__(name=name, distribution_function=distribution_function, *args, **kwargs)