Skip to content

Commit 102b982

Browse files
committed
return quantized indices as well
1 parent 2d5d324 commit 102b982

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
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.0.2',
6+
version = '0.1.0',
77
license='MIT',
88
description = 'Simple Vector Quantization, in Pytorch',
99
author = 'Phil Wang',

vector_quantize_pytorch/vector_quantize_pytorch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ def forward(self, input):
4646

4747
loss = F.mse_loss(quantize.detach(), input) * self.commitment
4848
quantize = input + (quantize - input).detach()
49-
return quantize, loss
49+
return quantize, embed_ind, loss

0 commit comments

Comments
 (0)