Do you mean to ask how to train only specific layers of a neural network? If so, one could try something like this:
for param in model.parameters():
   param.requires_grad = False

This way you can freeze or unfreeze whichever layers you want.