File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 3
3
setup (
4
4
name = 'vector_quantize_pytorch' ,
5
5
packages = find_packages (),
6
- version = '1.1.4 ' ,
6
+ version = '1.1.5 ' ,
7
7
license = 'MIT' ,
8
8
description = 'Vector Quantization - Pytorch' ,
9
9
long_description_content_type = 'text/markdown' ,
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ def __init__(
15
15
codebook_size ,
16
16
codebook_dim ,
17
17
num_codebooks = 1 ,
18
+ norm = True ,
18
19
** kwargs
19
20
):
20
21
super ().__init__ ()
@@ -28,7 +29,7 @@ def __init__(
28
29
# in section 3 of https://arxiv.org/abs/2202.01855
29
30
# "The input data is normalized to have 0 mean and standard deviation of 1 ... to prevent collapse"
30
31
31
- self .norm = nn .LayerNorm (dim , elementwise_affine = False )
32
+ self .norm = nn .LayerNorm (dim , elementwise_affine = False ) if norm else nn . Identity ()
32
33
33
34
self .vq = VectorQuantize (
34
35
dim = codebook_dim * num_codebooks ,
You can’t perform that action at this time.
0 commit comments