From ed249d1a261e74e034467ac7c11a81c8e86dbe55 Mon Sep 17 00:00:00 2001 From: Fredo Guan Date: Sat, 10 Dec 2022 20:45:33 -0800 Subject: [PATCH] Update davit.py --- timm/models/davit.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/timm/models/davit.py b/timm/models/davit.py index 6e6fb994..1636bfd3 100644 --- a/timm/models/davit.py +++ b/timm/models/davit.py @@ -669,13 +669,13 @@ class DaViTStage(nn.Module): self.blocks = nn.Sequential(*stage_blocks) - def forward(self, x : Tensor, size: Tuple[int, int]): - x, size = self.patch_embed(x, size) + def forward(self, x : Tensor): + x = self.patch_embed(x) if self.grad_checkpointing and not torch.jit.is_scripting(): - x, size = checkpoint_seq(self.blocks, x, size) + x = checkpoint_seq(self.blocks, x) else: - x, size = self.blocks(x, size) - return x, size + x = self.blocks(x) + return x class DaViT(nn.Module):