Skip to content

Commit 30c370e

Browse files
committed
Update dependencyvit.py
1 parent 1474331 commit 30c370e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

timm/models/dependencyvit.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,16 @@ def __init__(
4848
self.scale = self.head_dim ** -0.5
4949
self.track_dependency_mask = False
5050
self.dependency_mask = None
51-
self.head_selector_temperature = 1.0 # appendix D.1, causes nan when 0.1, 0 when 10.0
51+
self.head_selector_temperature = 0.1 # appendix D.1, causes nan when 0.1, 0 when 10.0
5252

53-
self.head_selector = nn.Linear(dim, num_heads)
53+
self.head_selector = nn.Linear(dim, num_heads, bias=False)
5454

5555
self.message_controller = Mlp(
5656
in_features = dim,
5757
hidden_features = int(dim/2),
5858
out_features = 1,
5959
act_layer = nn.GELU,
60-
bias = True, # FIXME is there a bias term?
60+
bias = False, # FIXME is there a bias term?
6161
)
6262

6363
self.qkv = nn.Linear(dim, dim * 3, bias=qkv_bias)
@@ -169,7 +169,7 @@ def __init__(self, *args, **kwargs):
169169
class_token=False,
170170
global_pool='avg',
171171
qkv_bias=False,
172-
init_values=1e-6,
172+
init_values=None,
173173
fc_norm=False,
174174
)
175175

0 commit comments

Comments
 (0)