def build_sinc_filters(self) -> torch.Tensor:
        """Builds the sinc filters based on current parameters."""
        # Computing the low frequencies of the filters
        low_freqs = self.min_freq + torch.abs(self.low_freqs)
        # Setting a minimum band and minimum freq
        high_freqs = torch.clamp(
            low_freqs + torch.abs(self.bandwidths),
            min=self.min_freq,
            max=self.sfreq / 2.0,
        )
        bandwidths = high_freqs - low_freqs

        # Passing from n_ to the corresponding f_times_t domain
        low = self.n_pi * low_freqs  # [kernel_size // 2, num_filters]
        high = self.n_pi * high_freqs  # [kernel_size // 2, num_filters]

        filters_left = (torch.sin(high) - torch.sin(low)) / (self.n_pi / 2.0)
        filters_left *= self.window
        filters_left /= 2.0 * bandwidths

        # [1, kernel_size // 2, 1, num_filters]
        filters_left = filters_left.unsqueeze(0).unsqueeze(2)
        filters_right = torch.flip(filters_left, dims=[1])

        filters = torch.cat(
            [filters_left, self.ones, filters_right], dim=1
        )  # [1, kernel_size, 1, num_filters]
        filters = filters / torch.std(filters)
        return filters
Builds the sinc filters based on current parameters.
braindecode/models/sinc_shallow.py