torchvision provides deeplabv3 implementations here 5 and you could manipulate the first conv layer as seen here:
model = models.segmentation.deeplabv3_resnet50(pretrained=False, progress=True, num_classes=21, aux_loss=None)

x = torch.randn(2, 3, 224, 224)
out = model(x)

model.backbone.conv1 = nn.Conv2d(4, 64, 7, 2, 3, bias=False)
x = torch.randn(2, 4, 224, 224)
out = model(x)