Skip to content

Commit 5fe30db

Browse files
committed
address #163
1 parent 22a0375 commit 5fe30db

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "vector-quantize-pytorch"
3-
version = "1.17.7"
3+
version = "1.17.8"
44
description = "Vector Quantization - Pytorch"
55
authors = [
66
{ name = "Phil Wang", email = "lucidrains@gmail.com" }

vector_quantize_pytorch/residual_vq.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ def forward(
367367

368368
# if shared codebook, update ema only at end
369369

370-
if self.shared_codebook:
370+
if self.training and self.shared_codebook:
371371
shared_layer = first(self.layers)
372372
shared_layer._codebook.update_ema()
373373
shared_layer.update_in_place_optimizer()

0 commit comments

Comments
 (0)