Hi,
There is no general guideline as it depends a lot on how the network you want to modify is structured as nn.Modules.
If you have your convs as self.conv1, self.conv2 etc, then you need to change these.
If they are in a Sequential, you can find them and replace the self.modules[conv_idx] value for each.
If it’s in the model definition in your python file, you can use another function like:
def new_conv(*args, **kwargs):
  if cfg.use_custom_conv:
    return MyConv(*args, **kwargs)
  else:
    nn.Conv2d(*args, **kwargs)

# In your net definition
self.conv = new_conv(foo, bar)