Skip to content

Commit

Permalink
[Fix] Fix type in Swin Transformer
Browse files Browse the repository at this point in the history
  • Loading branch information
MengzhangLI committed Feb 9, 2022
1 parent b4314f9 commit ece92a5
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 @@ -478,7 +478,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 @@ -609,7 +609,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 ece92a5

Please sign in to comment.