Finer control for Freezing layers in resnet

you may refer to

By the way, try format your code with markdown sytanx:

```
code here
```