HaokunGUI / VQ_MTM

MIT License
12 stars 2 forks source link

Question regarding the phase alignment #1

Closed jaeho3690 closed 5 months ago

jaeho3690 commented 5 months ago

Thank you for sharing your impressive work!

I have two questions about your phase alignment implementation in this line of code: https://github.com/HaokunGUI/VQ_MTM/blob/6912745920397c92d3f33f9585bb690da470f365/layers/Quantize.py#L25.

  1. Could you explain why you use phase[:, :, 1:2] for alignment, particularly why the first index is chosen? My background in signal processing is limited, so a detailed explanation would be really helpful.
  2. Also, how does multiplying the self.linear aligns the phase?

Thanks in advance!

HaokunGUI commented 5 months ago

Thank you for your insightful questions.

Regarding your first question, which is discussed in detail in the open review, we use phase[:, :, 1:2] because $\arg(\hat{z{1}})$ corresponds to the unit phase shift $2\pi \tau / N$ according to Equation (10), whereas the phase of $\hat{z}{0}$ is zero. This choice ensures proper phase alignment.

As for your second question, multiplying by self.linear aligns the phase as indicated by Equation (10).

If you have any further questions or need additional clarification, please feel free to ask.

Thanks again!