Implementation of a FIR Filter using nn.Conv1d

Hello! I would like to implement a FIR Filter using pytorch nn.Conv1d. i have computed the filter’s weights and I just want to compute the convolution using nn.Conv1d but I get some problems. Can anyone help me?

I got an error like: RuntimeError: Input type (CPUComplexFloatType) and weight type (CPUComplexDoubleType) should be the same

The error message points to a dtype mismatch of your input and weight tensor. Make sure both are using the same dtype by transforming one of them.

1 Like