Skip to content

Commit 4f2e1bf

Browse files
i-aki-yrwightman
authored andcommitted
Add missing docs in SwinTransformerStage
1 parent df7ae11 commit 4f2e1bf

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

timm/models/swin_transformer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,7 @@ def __init__(
384384
Args:
385385
dim: Number of input channels.
386386
input_resolution: Input resolution.
387+
out_dim: Number of output channels.
387388
depth: Number of blocks.
388389
downsample: Downsample layer at the end of the layer.
389390
num_heads: Number of attention heads.

timm/models/swin_transformer_v2.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,7 @@ def __init__(
378378
"""
379379
Args:
380380
dim: Number of input channels.
381+
out_dim: Number of output channels.
381382
input_resolution: Input resolution.
382383
depth: Number of blocks.
383384
num_heads: Number of attention heads.
@@ -640,7 +641,7 @@ def checkpoint_filter_fn(state_dict, model):
640641
k = re.sub(r'layers.(\d+).downsample', lambda x: f'layers.{int(x.group(1)) + 1}.downsample', k)
641642
k = k.replace('head.', 'head.fc.')
642643
out_dict[k] = v
643-
644+
644645
return out_dict
645646

646647

0 commit comments

Comments
 (0)