I am using for loop to modify the parameters in the model. I use named_parameters to check the names of the attributes and using for loop to record them.
weight_data = 
bias_key = 
for key,value in net.named_parameters():
What I want to do is modify the parameters in weight_data, I now I can use:
net.fc1.conv.data =  to do that, but I need to use for loop.
So how can I use keys in weight_key to do that? for example:
net.‘weight_key’.data = […] (which is not right, just need too use the value in ‘weight_key’)
I would appreciate your help!