[Urgent] BUG in s4d.py file
MichaelFYang opened this issue · 2 comments
MichaelFYang commented
Correct me if I'm wrong. Is the forward update of A in the minimal s4d file wrong? Shall it be
-torch.exp(self.log_A_real) - 1j * self.A_imag # (H N)
instead of A = -torch.exp(self.log_A_real) + 1j * self.A_imag # (H N)
, or something wrong with my understand the code file.
https://github.com/HazyResearch/state-spaces/blob/main/models/s4/s4d.py#L39
albertfgu commented
It would be the same either way because the real part is taken at the end. Conceptually, this the A value and its conjugate pair are both used in the sum: see Section 3.3 (Conjugate Symmetry) in the S4D paper.
MichaelFYang commented
I see. Thanks for the reply.