Hi, I have tried
class resnet2ch(torchvision.models.resnet.ResNet):
    def __init__(self,block, layers, num_classes=4):
        self.inplanes = 64
        super(resnet2ch, self).__init__()
        self.conv1 = nn.Conv2d(2, 64, kernel_size=7, stride=2, padding=3,bias=False)

and use
model= resnet2ch(torchvision.models.resnet.Bottleneck,[2, 2, 2, 2])

to build resnet18 with two channels. But I got the error:
super(resnet2ch, self).__init__()
TypeError: __init__() missing 2 required positional arguments: 'block' and 'layers'


Do you have any idea? thank you.