Changing modules in a network

Is there a way I can replace certain select modules in a network without having to change its definition? For example, in the example below I instantiate a resnet50 from torchvision and then replace ReLU with clampedRelu:

from torchvision.models import *
net = resnet50()

for i in range(args.start_epoch, args.epochs):
train(net, epoch)
test(net, epoch)
#end for

I dont know how to implement the replaceReluWithClampRelu function in the above example. Any ideas?