Skip to content

Commit

Permalink
address #163
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Sep 26, 2024
1 parent 22a0375 commit 5fe30db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "vector-quantize-pytorch"
version = "1.17.7"
version = "1.17.8"
description = "Vector Quantization - Pytorch"
authors = [
{ name = "Phil Wang", email = "[email protected]" }
Expand Down
2 changes: 1 addition & 1 deletion vector_quantize_pytorch/residual_vq.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ def forward(

# if shared codebook, update ema only at end

if self.shared_codebook:
if self.training and self.shared_codebook:
shared_layer = first(self.layers)
shared_layer._codebook.update_ema()
shared_layer.update_in_place_optimizer()
Expand Down

0 comments on commit 5fe30db

Please sign in to comment.