Skip to content

Commit

Permalink
Merge pull request #150 from dwromero/master
Browse files Browse the repository at this point in the history
Added access to codebook_size and codebook_dim as properties in ResidualVQ
  • Loading branch information
lucidrains authored Jul 28, 2024
2 parents 50ec361 + 0667da3 commit 0be9dbb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions vector_quantize_pytorch/residual_vq.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ def __init__(

for vq in rest_vq:
vq._codebook = codebook

@property
def codebook_size(self):
return self.layers[0].codebook_size

@property
def codebook_dim(self):
return self.layers[0].codebook_dim

@property
def codebooks(self):
Expand Down

0 comments on commit 0be9dbb

Please sign in to comment.