So you are saying
class convNet(nn.Module):
    #constructor
    def __init__(self,resnet,mynet):
        super(convNet, self).__init__()
        #defining layers in convnet
        self.resnet=resnet
        myNet=mynet
    def forward(self, x):
        x=self.resnet.layer1(x)
        x=self.resnet.layer2(x)
        x=self.resnet.layer3(x)
        x=myNet(x)
        return x

Is it okay if I just write self.resnet.layer1(x) or do I have to write everything for each conv layer in layer1?
And how can I set require_grad=False for layer1 and layer2 and require_grad=True for layer3