From 944fd549c40c51f9f0c30660f19c662e5f9518c6 Mon Sep 17 00:00:00 2001 From: Fredo Guan Date: Sun, 8 Jan 2023 09:37:49 -0800 Subject: [PATCH] Update metaformers.py --- timm/models/metaformers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/timm/models/metaformers.py b/timm/models/metaformers.py index 21f46b5f..d12c8735 100644 --- a/timm/models/metaformers.py +++ b/timm/models/metaformers.py @@ -650,7 +650,7 @@ class MetaFormer(nn.Module): stages = nn.ModuleList() # each stage consists of multiple metaformer blocks cur = 0 for i in range(num_stage): - stage = nn.Sequential(OrderedDict[ + stage = nn.Sequential(OrderedDict([ ('downsample', downsample_layers[i]), ('blocks', nn.Sequential(*[MetaFormerBlock( dim=dims[i], @@ -661,7 +661,7 @@ class MetaFormer(nn.Module): layer_scale_init_value=layer_scale_init_values[i], res_scale_init_value=res_scale_init_values[i] ) for j in range(depths[i])]) - )] + )]) ) stages.append(stage) cur += depths[i]