lucidrains / vector-quantize-pytorch

Vector (and Scalar) Quantization, in Pytorch
MIT License
2.44k stars 197 forks source link

Wrong implementation on residual fsq #96

Closed scenarios closed 9 months ago

scenarios commented 9 months ago
  1. scale should be (levels - 1) ** (-ind), which is equivalent to the min interval at current residual level.
  2. the initial residual should be bound(x) rather than x, as the quantized code is bounded one.
lucidrains commented 9 months ago

@scenarios would you like to highlight the lines of code you are referring to?

lucidrains commented 9 months ago

@scenarios oh crap, this is referring to my makeshift implementation

what you say makes sense.. made the change!