Skip to content

Commit b102a9b

Browse files
committed
address #17
1 parent 39a55fa commit b102a9b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

mlp_mixer_pytorch/mlp_mixer_pytorch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ def MLPMixer(*, image_size, channels, patch_size, dim, depth, num_classes, expan
3232
Rearrange('b c (h p1) (w p2) -> b (h w) (p1 p2 c)', p1 = patch_size, p2 = patch_size),
3333
nn.Linear((patch_size ** 2) * channels, dim),
3434
*[nn.Sequential(
35-
PreNormResidual(dim, FeedForward(num_patches, expansion_factor * dim, dropout, chan_first)),
36-
PreNormResidual(dim, FeedForward(dim, expansion_factor_token * dim, dropout, chan_last))
35+
PreNormResidual(dim, FeedForward(num_patches, int(expansion_factor * dim), dropout, chan_first)),
36+
PreNormResidual(dim, FeedForward(dim, int(expansion_factor_token * dim), dropout, chan_last))
3737
) for _ in range(depth)],
3838
nn.LayerNorm(dim),
3939
Reduce('b n c -> b c', 'mean'),

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
setup(
44
name = 'mlp-mixer-pytorch',
55
packages = find_packages(exclude=[]),
6-
version = '0.3.0',
6+
version = '0.3.1',
77
license='MIT',
88
description = 'MLP Mixer - Pytorch',
99
long_description_content_type = 'text/markdown',

0 commit comments

Comments
 (0)