class_docstr: ResNet with the softmax chopped off and the batchnorm frozen
class_docstr_tok: ["ResNet","with","the","softmax","chopped","off","and","the","batchnorm","frozen"]
code: def freeze_bn(self):
      for m in self.network.modules():
          if isinstance(m, nn.BatchNorm2d):
              m.eval()
  
imports: import torch
  import torch.nn
  import torch.nn.functional
  import torchvision.models
label_desc: Use image node_id 4 for calling the ResNet obj's underlying member method code with example usage: obj.freeze_bn() without return types