Skip to content

Commit

Permalink
central claim
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Jun 18, 2024
1 parent 081d4cf commit 479b8f8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ from titok_pytorch.titok import TiTokTokenizer

images = torch.randn(2, 3, 256, 256)

titok = TiTokTokenizer(dim = 512)
titok = TiTokTokenizer(
dim = 512,
num_latent_tokens = 32, # they claim only 32 tokens needed
codebook_size = 8192 # codebook size 8192
)

loss = titok(images)
loss.backward()
Expand Down

0 comments on commit 479b8f8

Please sign in to comment.