Skip to content

Commit

Permalink
update readme so users understand actual dalle is much bigger
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Jan 16, 2021
1 parent e789cab commit 49fc35a
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ from dalle_pytorch import DiscreteVAE
vae = DiscreteVAE(
image_size = 256,
num_layers = 3, # number of downsamples - ex. 256 / (2 ** 3) = (32 x 32 feature map)
num_tokens = 1024, # number of visual tokens. iGPT had 512, so probably should have more
num_tokens = 8192, # number of visual tokens. in the paper, they used 8192, but could be smaller for downsized projects
codebook_dim = 512, # codebook dimension
hidden_dim = 64, # hidden dimension
num_resnet_blocks = 1, # number of resnet blocks
temperature = 0.9 # gumbel softmax temperature, the lower this is, the more hard the discretization
)

Expand All @@ -52,19 +53,20 @@ from dalle_pytorch import DiscreteVAE, DALLE
vae = DiscreteVAE(
image_size = 256,
num_layers = 3,
num_tokens = 1024,
codebook_dim = 512,
num_tokens = 8192,
codebook_dim = 1024,
hidden_dim = 64,
num_resnet_blocks = 1,
temperature = 0.9
)

dalle = DALLE(
dim = 512,
dim = 1024,
vae = vae, # automatically infer (1) image sequence length and (2) number of image tokens
num_text_tokens = 10000, # vocab size for text
text_seq_len = 256, # text sequence length
depth = 6, # should be 64
heads = 8, # attention heads
depth = 12, # should aim to be 64
heads = 16, # attention heads
dim_head = 64, # attention head dimension
attn_dropout = 0.1, # attention dropout
ff_dropout = 0.1 # feedforward dropout
Expand Down Expand Up @@ -135,12 +137,12 @@ Simply set the `reversible` keyword to `True` for the `DALLE` class

```python
dalle = DALLE(
dim = 512,
dim = 1024,
vae = vae,
num_text_tokens = 10000,
text_seq_len = 256,
depth = 64,
heads = 8,
heads = 16,
reversible = True # <-- reversible networks https://arxiv.org/abs/2001.04451
)
```
Expand Down

0 comments on commit 49fc35a

Please sign in to comment.