fix nest type error

This commit is contained in:
Ryan 2025-05-06 03:43:49 +08:00 committed by Ross Wightman
parent 72b2a09106
commit 99c25fa5c0

View File

@ -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: