Update davit.py

pull/1630/head
Fredo Guan 3 years ago
parent 1d2a34f20f
commit 488c263a63

@ -103,7 +103,7 @@ class PatchEmbed(nn.Module):
@register_notrace_function # reason: dim in control sequence @register_notrace_function # reason: dim in control sequence
def forward(self, x : Tensor, size: Tuple[int, int]): def forward(self, x : Tensor, size: Tuple[int, int]):
H, W = size H, W = size
dim = len(x.shape) dim = x.dim()
if dim == 3: if dim == 3:
B, HW, C = x.shape B, HW, C = x.shape
x = self.norm(x) x = self.norm(x)

Loading…
Cancel
Save