mirror of
https://github.com/open-mmlab/mmsegmentation.git
synced 2025-06-03 22:03:48 +08:00
vit contiguous (#992)
This commit is contained in:
parent
e27017efa7
commit
93f8b142a3
@ -395,7 +395,7 @@ class VisionTransformer(BaseModule):
|
|||||||
out = x
|
out = x
|
||||||
B, _, C = out.shape
|
B, _, C = out.shape
|
||||||
out = out.reshape(B, hw_shape[0], hw_shape[1],
|
out = out.reshape(B, hw_shape[0], hw_shape[1],
|
||||||
C).permute(0, 3, 1, 2)
|
C).permute(0, 3, 1, 2).contiguous()
|
||||||
if self.output_cls_token:
|
if self.output_cls_token:
|
||||||
out = [out, x[:, 0]]
|
out = [out, x[:, 0]]
|
||||||
outs.append(out)
|
outs.append(out)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user