Skip to content

Commit 17b530d

Browse files
committed
feat: parameterize atrous_rates for deeplabv3 in DeepLabHead.
1 parent 16967f0 commit 17b530d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

torchvision/models/segmentation/deeplabv3.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ class DeepLabV3(_SimpleSegmentationModel):
4646

4747

4848
class DeepLabHead(nn.Sequential):
49-
def __init__(self, in_channels: int, num_classes: int) -> None:
49+
def __init__(self, in_channels: int, num_classes: int, atrous_rates: List[int] = [12, 24, 36]) -> None:
5050
super().__init__(
51-
ASPP(in_channels, [12, 24, 36]),
51+
ASPP(in_channels, atrous_rates),
5252
nn.Conv2d(256, 256, 3, padding=1, bias=False),
5353
nn.BatchNorm2d(256),
5454
nn.ReLU(),

0 commit comments

Comments
 (0)