Solved by L0SG in post #2 
              
              
                Each parameters of the model have requires_grad flag: 
http://pytorch.org/docs/master/notes/autograd.html 
For resnet example in the doc, this loop will freeze all layers 
for param in model.parameters():
    param.requires_grad = False

For partially unfreezing some of the last layers, we can ident…