Skip to content

Commit

Permalink
Update transformer.py
Browse files Browse the repository at this point in the history
  • Loading branch information
hehefan authored Mar 30, 2022
1 parent 03b9f01 commit ea79fae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules-pytorch-1.8.1/transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def __init__(self, dim, depth, heads, dim_head, mlp_dim, dropout = 0.):
self.layers = nn.ModuleList([])
for _ in range(depth):
self.layers.append(nn.ModuleList([
Residual(PreNorm(dim, Attention(dim, heads = heads, dim_head = dim_head, dropout = dropout))),
Residual(PreNorm(dim, Attention(dim, heads = heads, dim_head = dim_head, dropout = 0.))),
Residual(PreNorm(dim, FeedForward(dim, mlp_dim, dropout = dropout)))
]))
def forward(self, x):
Expand Down

0 comments on commit ea79fae

Please sign in to comment.