Update vision_transformer.py

pull/367/head
Zhiyuan Chen 5 years ago committed by GitHub
parent ee3d8050c8
commit 28c0fa31fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -136,6 +136,7 @@ class Block(nn.Module):
self.norm2 = norm_layer(dim)
mlp_hidden_dim = int(dim * mlp_ratio)
self.mlp = Mlp(in_features=dim, hidden_features=mlp_hidden_dim, act_layer=act_layer, drop=drop)
self.dropout = nn.Dropout(p=drop)
def forward(self, x):
residual = x.clone()

Loading…
Cancel
Save