Hi, I want to systematically, change layers parameters of a model,
I saw this post in 2017,

  
    
    
    How can I modify certain layer's weight and bias? 
  
  
    I want to duplicate the paper’s work:Incremental network quantization. 
In this paper ,the author quantize 50% parameters in a CNN network to pow of 2 and do not update these parameters(update the other 50% parameters to compensate the inaccuracy caused by quanzation) 
I make a mask to indicate the parameters weather are quantized. 
My code is like this: 
qua_weight = qua_tensor(weight, pos_shreshold, mask_weight, max_ind, 2**3)
net.state_dict()['features.0.weight'].data = qua_weight

I found th…
  


But I am looking for some method to iterated over the layers and change them.
something like this:
FOR i in model.[iterable list of parameters]:
model.[list of parameters][i]=model.[list of parameters][i]*2
so I could iterate over layers and assign them new value based on the previous ones.