here is a general function for replacing any layer
def replace_layers(model, old, new):
    for n, module in model.named_children():
        if len(list(module.children())) > 0:
            ## compound module, go inside it
            replace_layers(module, old, new)
            
        if isinstance(module, old):
            ## simple module
            setattr(model, n, new)

replace_layer(model, nn.ReLU, nn.ReLU6())

Note: It uses isinstance() method to check layers. Hence, be cautious while replacing nn.Sequential. I would recommend, its a compound layers, so do it manually.
I struggled with it for a few days. So, I did some digging & wrote a kaggle notebook 12 explaining how different types of layers / modules are accessed in pytorch.