Skip to content

Commit

Permalink
return quantized indices as well
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Oct 22, 2020
1 parent 2d5d324 commit 102b982
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
setup(
name = 'vector_quantize_pytorch',
packages = find_packages(),
version = '0.0.2',
version = '0.1.0',
license='MIT',
description = 'Simple Vector Quantization, in Pytorch',
author = 'Phil Wang',
Expand Down
2 changes: 1 addition & 1 deletion vector_quantize_pytorch/vector_quantize_pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ def forward(self, input):

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

0 comments on commit 102b982

Please sign in to comment.