mirror of
https://github.com/huggingface/pytorch-image-models.git
synced 2025-06-03 15:01:08 +08:00
Add missing docs in SwinTransformerStage
This commit is contained in:
parent
df7ae11eb2
commit
4f2e1bf4cb
@ -384,6 +384,7 @@ class SwinTransformerStage(nn.Module):
|
||||
Args:
|
||||
dim: Number of input channels.
|
||||
input_resolution: Input resolution.
|
||||
out_dim: Number of output channels.
|
||||
depth: Number of blocks.
|
||||
downsample: Downsample layer at the end of the layer.
|
||||
num_heads: Number of attention heads.
|
||||
|
@ -378,6 +378,7 @@ class SwinTransformerV2Stage(nn.Module):
|
||||
"""
|
||||
Args:
|
||||
dim: Number of input channels.
|
||||
out_dim: Number of output channels.
|
||||
input_resolution: Input resolution.
|
||||
depth: Number of blocks.
|
||||
num_heads: Number of attention heads.
|
||||
@ -640,7 +641,7 @@ def checkpoint_filter_fn(state_dict, model):
|
||||
k = re.sub(r'layers.(\d+).downsample', lambda x: f'layers.{int(x.group(1)) + 1}.downsample', k)
|
||||
k = k.replace('head.', 'head.fc.')
|
||||
out_dict[k] = v
|
||||
|
||||
|
||||
return out_dict
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user