Skip to content

harr_wavelet

Bases: discrete_wavelet

Source code in tinybig/koala/signal_processing/wavelet.py
class harr_wavelet(discrete_wavelet):
    def __init__(self, name: str = 'harr_wavelet', *args, **kwargs):
        super().__init__(name=name, *args, **kwargs)

    def psi(self, tau: torch.Tensor):
        result = torch.zeros_like(tau)
        result[(tau >= 0) & (tau < 0.5)] = 1
        result[(tau >= 0.5) & (tau < 1)] = -1
        return result