code: def __init__(self):
      super(CatDogModel, self).__init__()
      self.features = torchvision.models.resnet18(pretrained=True)
      # freeze weight update
      for parameter in self.features.parameters():
          parameter.requires_grad_(False)
      self.dense1 = nn.Linear(1000, 2)
  
file_path: analytics-zoo/pyzoo/zoo/examples/pytorch/train/resnet_finetune/resnet_finetune.py
imports: import torchvision
  import torch.nn
  import torch.nn.functional
  from pyspark.sql.types import StringType, DoubleType
  from pyspark.sql.functions import col, udf
  from bigdl.optim.optimizer import *
  from zoo.common.nncontext import *
  from zoo.feature.image import *
  from zoo.pipeline.api.torch import TorchModel, TorchLoss
  from zoo.pipeline.nnframes import *
  from zoo.pipeline.api.keras.metrics import Accuracy
  from zoo.util.utils import detect_conda_env_name
label_desc: Use image node_id 1 to create a new CatDogModel object from inherited base classes: nn with example: obj = CatDogModel()