Skip to content

Commit

Permalink
fix issue with simsiam mlp hidden size
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Apr 13, 2022
1 parent b069cf1 commit 8eac5ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
name = 'x-clip',
packages = find_packages(exclude=[]),
include_package_data = True,
version = '0.4.4',
version = '0.4.5',
license='MIT',
description = 'X-CLIP',
author = 'Phil Wang',
Expand Down
2 changes: 2 additions & 0 deletions x_clip/visual_ssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ def MLP(dim, projection_size, hidden_size = None):
)

def SimSiamMLP(dim, projection_size, hidden_size = 4096):
hidden_size = default(hidden_size, projection_size * 2)

return nn.Sequential(
nn.Linear(dim, hidden_size, bias = False),
nn.BatchNorm1d(hidden_size),
Expand Down

0 comments on commit 8eac5ed

Please sign in to comment.