docstr: Load the pretrained ResNet-152 and replace top fc layer.
docstr_tok: ["Load","the","pretrained","ResNet-152","and","replace","top","fc","layer","."]
code: def __init__(self, embed_size):
      """Load the pretrained ResNet-152 and replace top fc layer."""
      super(EncoderCNN, self).__init__()
      resnet = models.resnet152(pretrained=True)
      modules = list(resnet.children())[
          :-1
      ]  # delete the last fc layer.
      self.resnet = nn.Sequential(*modules)
      self.linear = nn.Linear(resnet.fc.in_features, embed_size)
      self.bn = nn.BatchNorm1d(embed_size, momentum=0.01)
  
file_path: pytorch-tutorial/tutorials/03-advanced/image_captioning/model.py
imports: import torch
  import torch.nn
  import torchvision.models
  from torch.nn.utils.rnn import pack_padded_sequence
label_desc: Use image node_id 1 to create a new EncoderCNN object from inherited base classes: nn with example: obj = EncoderCNN(embed_size)