Skip to content

Commit

Permalink
Fix SETR export bug
Browse files Browse the repository at this point in the history
  • Loading branch information
nepeplwu committed Jul 13, 2021
1 parent 2bff95e commit 7df00a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion paddleseg/models/backbones/vision_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ def __init__(self,
self.proj_drop = nn.Dropout(proj_drop)

def forward(self, x):
N, C = x.shape[1:]
x_shape = paddle.shape(x)
N, C = x_shape[1], x_shape[2]
qkv = self.qkv(x).reshape((-1, N, 3, self.num_heads,
C // self.num_heads)).transpose((2, 0, 3, 1,
4))
Expand Down

0 comments on commit 7df00a6

Please sign in to comment.