I have pretrain model like resnet50, I want to retrain for new data
in keras, I do following, how to do it in pytorch:
for layer in base_model.layers:
if not isinstance(layer, layers.BatchNormalization): layer.trainable = False
How to iterator every layers in pytorch model to find out nn.BatchNorm2d?