I extracted the parameters via model.state_dict, and removed the channel according to a certain threshold.Give an example below：
conv1 = self.conv1(x)
conv2 = self.conv2(conv1 )
conv1 param  (output_channel1,input_channel1,kernel_x,kernel_y)
conv2 param  (output_channel2,output_channel1,kernel_x,kernel_y)
remove 20% param in output_channel1 and after removed
conv1 param  (output_channel1 x 80%,input_channel1,kernel_x,kernel_y)
conv2 param  (output_channel2,output_channel1 x 80%,kernel_x,kernel_y)
I purned the model channel , but if I want to use this purned parameter, I have to modify the model.py.Obviously this is very troublesome.I think that loading the purned parameters first, reading the corresponding number of channels, and passing the number of channels per layer when generating the network can solve this problem.But I feel that this kind of practice is also more troublesome. I would like to ask you what better way, let me save the structure and parameters directly after purning the parameters.