@sansmoriaxz I think you didnt fully understand my question I’m talking about replacing a layer type with another type for example, replacing torch.nn.Conv2d(*args, **kwargs) with mypackage.CustomConv2d(*args, **kwargs)
@albanD you replied in a similar thread How to replace all ReLU activations in a pretrained network? 50 that it can be done inplace, but it is not clear to me exactly how that should be done.