A PyTorch-based module for building trainable FIR filters in deep neural networks. Key features:
- π§ Seamless integration with existing PyTorch models
- ποΈ Pre-defined filters or learnable coefficients
- π Real-time frequency adaptation visualization
- β‘ CUDA-accelerated computation
"Enabling neural networks to understand signal processing through differentiable filters"
git clone https://github.com/FunkyFrog1/FirConv.git
cd FirConv
pip install .pip install firconvimport torch
from firconv.firconv import FirConv
# Create learnable FIR filter with 32 taps
fir = FirConv(fres=100, fs=250)
# Process 1D signal batch: (batch_size, channels, seq_len)
x = torch.randn(1, 63, 250) # Batch of 63 signals
y = fir(x) # Output shape: (1, 63, 250)| Argument | Type | Default | Description |
|---|---|---|---|
fres |
int | 100 | Filter frequency range [0-fres] |
N |
int | - | Filter window size(default compute by fres and fs |
fs |
int | 250 | Sample rate |
- Initial public release
- Add CUDA kernel optimization
- Support multi-channel filtering
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
Apache 2.0 Β© 2025 FunkyFrog