Change the particular layer name of in Pytorch

A portion of the model looks like this

I can access my one of the relu function as “print(model.bottleneck.layer1[0].relu)”

This print out as “ReLU(inplace=True)”.

Now I want to replace the variable name relu to relu1. So that I finally need to access as model.bottleneck.layer1[0].relu1

Can some one plz help in this

Hi @ptrblck, Can you please check this out?