code: def setUp(self) -> None:
      # Discard layers at the end of base network
      encoder = resnet18(pretrained=True)
      base_model = nn.Sequential(
          encoder.conv1,
          encoder.bn1,
          encoder.relu,
          encoder.maxpool,
          encoder.layer1,
          encoder.layer2,
          encoder.layer3,
          encoder.layer4,
      )
      self.dim = list(base_model.parameters())[-1].shape[
          0
      ]  # last channels (512)
      self.num_clusters = 32
  
      # Define model for embedding, K clusters determined by num_clusters
      net_vlad = NetVLAD(
          num_clusters=self.num_clusters, dim=self.dim, alpha=1.0
      )
      self.model = EmbedNet(base_model, net_vlad)
      img_pil = Image.open(test_image)
      self.img_tensor = torchvision.transforms.ToTensor()(
          img_pil
      ).unsqueeze(0)
  
file_path: towhee/tests/unittests/models/layers/test_netvlad.py
imports: import unittest
  import torchvision
  from pathlib import Path
  from towhee.utils.pil_utils import PILImage
  from towhee.models.layers.netvlad import NetVLAD, EmbedNet
  from torchvision.models import resnet18
  from torch import nn
label_desc: Use image node_id 1 for calling the NetvladTest obj's underlying member method code with example usage: obj.setUp() without return types