From 99c25fa5c0e0578a50d0ea6dd3692b7a93bcc344 Mon Sep 17 00:00:00 2001 From: Ryan <23580140+brianhou0208@users.noreply.github.com> Date: Tue, 6 May 2025 03:43:49 +0800 Subject: [PATCH] fix nest type error --- timm/models/nest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/timm/models/nest.py b/timm/models/nest.py index 8b4ce5ed..9a423a97 100644 --- a/timm/models/nest.py +++ b/timm/models/nest.py @@ -449,7 +449,7 @@ class Nest(nn.Module): # forward pass x = self.patch_embed(x) - last_idx = self.num_blocks - 1 + last_idx = len(self.num_blocks) - 1 if torch.jit.is_scripting() or not stop_early: # can't slice blocks in torchscript stages = self.levels else: