Skip to content

Commit e2b338b

Browse files
committed
keep default value consistent with official repo
1 parent f643ff0 commit e2b338b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

torchvision/models/swin_transformer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ class SwinTransformer(nn.Module):
522522
mlp_ratio (float): Ratio of mlp hidden dim to embedding dim. Default: 4.0.
523523
dropout (float): Dropout rate. Default: 0.0.
524524
attention_dropout (float): Attention dropout rate. Default: 0.0.
525-
stochastic_depth_prob (float): Stochastic depth rate. Default: 0.0.
525+
stochastic_depth_prob (float): Stochastic depth rate. Default: 0.1.
526526
num_classes (int): Number of classes for classification head. Default: 1000.
527527
block (nn.Module, optional): SwinTransformer Block. Default: None.
528528
norm_layer (nn.Module, optional): Normalization layer. Default: None.
@@ -539,7 +539,7 @@ def __init__(
539539
mlp_ratio: float = 4.0,
540540
dropout: float = 0.0,
541541
attention_dropout: float = 0.0,
542-
stochastic_depth_prob: float = 0.0,
542+
stochastic_depth_prob: float = 0.1,
543543
num_classes: int = 1000,
544544
block: Callable[..., nn.Module] = SwinTransformerBlock,
545545
norm_layer: Optional[Callable[..., nn.Module]] = None,

0 commit comments

Comments
 (0)