Skip to content

Commit

Permalink
[Fix] Fix type in Swin Transformer (#1274)
Browse files Browse the repository at this point in the history
  • Loading branch information
MengzhangLI authored Feb 9, 2022
1 parent a39f585 commit b163101
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mmseg/models/backbones/swin.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ class SwinTransformer(BaseModule):
embed_dims (int): The feature dimension. Default: 96.
patch_size (int | tuple[int]): Patch size. Default: 4.
window_size (int): Window size. Default: 7.
mlp_ratio (int): Ratio of mlp hidden dim to embedding dim.
mlp_ratio (int | float): Ratio of mlp hidden dim to embedding dim.
Default: 4.
depths (tuple[int]): Depths of each Swin Transformer stage.
Default: (2, 2, 6, 2).
Expand Down Expand Up @@ -610,7 +610,7 @@ def __init__(self,
stage = SwinBlockSequence(
embed_dims=in_channels,
num_heads=num_heads[i],
feedforward_channels=mlp_ratio * in_channels,
feedforward_channels=int(mlp_ratio * in_channels),
depth=depths[i],
window_size=window_size,
qkv_bias=qkv_bias,
Expand Down

0 comments on commit b163101

Please sign in to comment.