code: def __init__(self, n_layers=18):
      super().__init__()
      assert n_layers in [18, 34, 50]
      model = getattr(models, "resnet{}".format(n_layers))(
          pretrained=True
      )
      dummy_input = torch.rand([1, 3, 224, 224])
      self.model = crypten.nn.from_pytorch(model, dummy_input)
  
imports: from dataclasses import dataclass
  from typing import Any
  import crypten
  import torch
  import torch.nn
  from torchvision import models
label_desc: Use image node_id 1 to create a new ResNetCrypTen object from inherited base classes: crypten.nn with example: obj = ResNetCrypTen(n_layers)