Hi thanks for the help. I’ve already found that the problem was that self.patch_filt was not defined as a Variable, so doing
Variable(torch.from_numpy(self.patch_filt[:, :, :, 0])).float()

solved the problem