Skip to content

Commit 4467f8d

Browse files
committed
fix a bug with replacement of stale codes in euclidean codebook, thanks to @apoorv2904
1 parent 90478f4 commit 4467f8d

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
setup(
44
name = 'vector_quantize_pytorch',
55
packages = find_packages(),
6-
version = '0.10.14',
6+
version = '0.10.15',
77
license='MIT',
88
description = 'Vector Quantization - Pytorch',
99
long_description_content_type = 'text/markdown',

vector_quantize_pytorch/vector_quantize_pytorch.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,6 @@ def init_embed_(self, data):
242242
self.initted.data.copy_(torch.Tensor([True]))
243243

244244
def replace(self, batch_samples, batch_mask):
245-
batch_samples = l2norm(batch_samples)
246-
247245
for ind, (samples, mask) in enumerate(zip(batch_samples.unbind(dim = 0), batch_mask.unbind(dim = 0))):
248246
if not torch.any(mask):
249247
continue

0 commit comments

Comments
 (0)