Hello, @lucidrains, I have some questions,
I see that there are two different distance calculation methods in the file lookup_free_quantization.py,
for branch master, line 337,
distance = -2 * einsum('... i d, j d -> ... i j', original_input, codebook)
for branch fix-lfq-distance, line 229,
distance = euclidean_distance_squared(original_input, self.codebook)
My questions are:
1.Why do you take the first formulation while euclidean_distance_squared is adopted in many projects?
2.Would they result in different peformance?
Thanks.
Hello, @lucidrains, I have some questions, I see that there are two different distance calculation methods in the file lookup_free_quantization.py, for branch master, line 337,
distance = -2 * einsum('... i d, j d -> ... i j', original_input, codebook)
for branch fix-lfq-distance, line 229,distance = euclidean_distance_squared(original_input, self.codebook)
My questions are: 1.Why do you take the first formulation while euclidean_distance_squared is adopted in many projects? 2.Would they result in different peformance? Thanks.