I’m trying to use per-trained ResNet-18 model for binary classification with modification in input channel and kernel size of 1st Conv layer. What is the best way to do this?  Also does this approach uses pretrained weight for conv1 layer?Currently I’m trying like this
model=models.resnet18(pretrained=True)
model.conv1=nn.Conv2d(1,64,kernel_size=(3,3),stride=(2,2),padding=(3,3),bias=False)
num_ftrs=model.fc.in_features
model.fc=nn.Linear(num_ftrs,2)