Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about quantizer #51

Open
hulilin666 opened this issue Dec 24, 2024 · 0 comments
Open

Question about quantizer #51

hulilin666 opened this issue Dec 24, 2024 · 0 comments

Comments

@hulilin666
Copy link

Hello, I noticed that in the quantization process you use the operation w_bar = tf.round(tf.stop_gradient(w_hard - w_soft) + w_soft). However, tf.round is a non-differentiable operation, which will prevent the gradients from being backpropagated to the encoder part, resulting in the encoder parameters not being updated throughout the training process. I believe the correct operation should be w_bar = tf.stop_gradient(w_hard - w_soft) + w_soft.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant