code: def forward(self, x: Tensor) -> Tensor:
      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)
      return torch.flatten(x, 1)
  
imports: from functools import partial
  from typing import Any, Callable, List, Optional, Type, Union
  import torch
  import torch.nn
  from torch import Tensor
  from torch.hub import load_state_dict_from_url
  from flash.core.registry import FlashRegistry
  from flash.core.utilities.imports import _TIMM_AVAILABLE
  from flash.core.utilities.url_error import catch_url_error
label_desc: Use image node_id 3 for calling the ResNet obj's underlying member method code with example usage: obj.forward(x) and returns: torch