Solved by Hmrishav_Bandyopadhy in post #3 
              
              
                You can define a module in this structure 
class Net(nn.Module):
    def __init__(self):
        super(Net, self).__init__()
        self.fc0=nn.Linear(...)
        self.fc1=nn.Linear(...)
        self.fc2=nn.Linear(...)
        self.fc3=nn.Linear(...)
        self.Rb0= ...
        self.Rb1= ...
   …