HazyResearch / safari

Convolutions for Sequence Modeling
Apache License 2.0
864 stars 71 forks source link

learn_ifft in long_conv.py #38

Closed robflynnyh closed 1 year ago

robflynnyh commented 1 year ago

In sequence.long_conv on line 144 there is a clause:

            if self.learn_ifft:
                y = self.block_fft_u(y_f, N=L_kernel+L,forward=False).real[..., :L]
            else:
                y = torch.fft.ifft(y_f, n=L_kernel+L, dim=-1).real[..., :L] # (B C H L)

However, learn_ifft is not defined anywhere and hence throws an error.

DanFu09 commented 1 year ago

Great catch! A leftover option from an old version of the code :)