Skip to content

Commit 9d597af

Browse files
committed
by default, dimension of memories (values) will be chosen so output dimensions is equal to the embedding dimension
1 parent 1c08320 commit 9d597af

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

discrete_key_value_bottleneck_pytorch/discrete_key_value_bottleneck.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def __init__(
3636
**kwargs
3737
)
3838

39-
dim_memory = default(dim_memory, dim)
39+
dim_memory = default(dim_memory, dim // num_memory_codebooks)
4040
self.values = nn.Parameter(torch.randn(num_memory_codebooks, num_memories, dim_memory))
4141

4242
def forward(self, x, **kwargs):

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
setup(
44
name = 'discrete-key-value-bottleneck-pytorch',
55
packages = find_packages(exclude=[]),
6-
version = '0.0.3',
6+
version = '0.0.4',
77
license='MIT',
88
description = 'Discrete Key / Value Bottleneck - Pytorch',
99
author = 'Phil Wang',

0 commit comments

Comments
 (0)