Thanks for your response!
I was trying to find if a model has a convolution layer and if present, add another custom layer infront of it.
Pseudo Code
for layer in self.model.children():
if isinstance(layer, nn.Conv2d):
#add a custom layer infront of it
Is this possible to achieve in pytorch?