code: def _forward_impl(self, x: Tensor) -> Tensor:
      # See note [TorchScript super()]
      x = self.conv1(x)
      x = self.bn1(x)
      x = self.relu(x)
      x = self.maxpool(x)
  
      x = self.layer1(x)
      x = self.layer2(x)
      x = self.layer3(x)
      x = self.layer4(x)
  
      x = self.avgpool(x)
      x = torch.flatten(x, 1)
      x = self.fc(x)
  
      return x
  
imports: from functools import partial
  from typing import Any, Callable, List, Optional, Type, Union
  import torch
  import torch.nn
  from torch import Tensor
  from ..transforms._presets import ImageClassification
  from ..utils import _log_api_usage_once
  from ._api import register_model, Weights, WeightsEnum
  from ._meta import _IMAGENET_CATEGORIES
  from ._utils import _ovewrite_named_param, handle_legacy_interface
label_desc: Use image node_id 3 for calling the ResNet obj's underlying member method code with example usage: obj._forward_impl(x) and returns: x