csteinmetz1 / auraloss

Collection of audio-focused loss functions in PyTorch
Apache License 2.0
695 stars 66 forks source link

Question about the FIRFilter implementation #40

Closed lminer closed 1 year ago

lminer commented 1 year ago

I noticed that in the FIRFilter layer, you create a conv1d layer, but then use a separate conv1d function with the kernel of the conv1d layer in the forward pass. Is there a reason you did this rather than either using the conv1d layer directly or registering taps as a buffer and using that as the weight?

csteinmetz1 commented 1 year ago

Hi @lminer,

That is a fair question. Both ways should work. Perhaps creating a tensor and registering it as a buffer is the cleaner solution. However, they should both be functionally the same.