However, if you want to prune that network, you have to choose another way.
Here is the post about how to replace network in running time: https://find1dream.github.io/en/How_to_change_CNN_structure_in_running_time_with_pytorch 106