Skip to content

Commit 0f970c4

Browse files
committed
quick fix for get_codes_from_indices
1 parent 6102e37 commit 0f970c4

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-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 = '1.14.1',
6+
version = '1.14.2',
77
license='MIT',
88
description = 'Vector Quantization - Pytorch',
99
long_description_content_type = 'text/markdown',

vector_quantize_pytorch/vector_quantize_pytorch.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -826,8 +826,7 @@ def get_codes_from_indices(self, indices):
826826
is_multiheaded = codebook.ndim > 2
827827

828828
if not is_multiheaded:
829-
codes = codebook[indices]
830-
return rearrange(codes, '... h d -> ... (h d)')
829+
return codebook[indices]
831830

832831
indices, ps = pack_one(indices, 'b * h')
833832
indices = rearrange(indices, 'b n h -> b h n')

0 commit comments

Comments
 (0)