class_docstr: Extract image feature using pretrained CNN network.
class_docstr_tok: ["Extract","image","feature","using","pretrained","CNN","network","."]
code: def _init_transform(self):
      # initialize the transform function using torch vision.
      try:
          import torchvision
          import torchvision.transforms
  
          self.torchvision = torchvision
          self.transforms = torchvision.transforms
  
      except ImportError:
          raise ImportError(
              "Please install torchvision; see https://pytorch.org/"
          )
  
      self.transform = self.transforms.Compose(
          [
              self.transforms.Resize(self.image_size),
              self.transforms.CenterCrop(self.crop_size),
              self.transforms.ToTensor(),
              self.transforms.Normalize(
                  mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]
              ),
          ]
      )
  
imports: import parlai.core.build_data
  import parlai.utils.logging
  from parlai.utils.io import PathManager
  import os
  from PIL import Image
  import torch
  from zipfile import ZipFile
label_desc: Use image node_id 3 for calling the ImageLoader obj's underlying member method code with example usage: obj._init_transform() without return types