class_docstr: Wrapper for TorchVison ResNet Model to support different depth and
  width_multiplier. We provide flexibility with LAB input, stride in last
  ResNet block and type of norm (BatchNorm, LayerNorm)
class_docstr_tok: ["Wrapper","for","TorchVison","ResNet","Model","to","support","different","depth","and","width_multiplier",".","We","provide","flexibility","with","LAB","input",",","stride","in","last","ResNet","block","and","type","of","norm","(","BatchNorm",",","LayerNorm",")"]
code: def forward(
      self, x: torch.Tensor, out_feat_keys: List[str] = None
  ) -> List[torch.Tensor]:
      if isinstance(x, MultiDimensionalTensor):
          out = get_tunk_forward_interpolated_outputs(
              input_type=self.model_config.INPUT_TYPE,
              interpolate_out_feat_key_name="res5",
              remove_padding_before_feat_key_name="avgpool",
              feat=x,
              feature_blocks=self._feature_blocks,
              feature_mapping=self.feat_eval_mapping,
              use_checkpointing=self.use_checkpointing,
              checkpointing_splits=self.num_checkpointing_splits,
          )
      else:
          model_input = transform_model_input_data_type(
              x, self.model_config.INPUT_TYPE
          )
          out = get_trunk_forward_outputs(
              feat=model_input,
              out_feat_keys=out_feat_keys,
              feature_blocks=self._feature_blocks,
              feature_mapping=self.feat_eval_mapping,
              use_checkpointing=self.use_checkpointing,
              checkpointing_splits=self.num_checkpointing_splits,
          )
      return out
  
imports: import logging
  from enum import Enum
  from typing import List
  import torch
  import torch.nn
  import torchvision.models
  from torchvision.models.resnet import BasicBlock, Bottleneck
  from vissl.config import AttrDict
  from vissl.data.collators.collator_helper import MultiDimensionalTensor
  from vissl.models.model_helpers import _get_norm, Flatten, get_trunk_forward_outputs, get_tunk_forward_interpolated_outputs, transform_model_input_data_type
  from vissl.models.trunks import register_model_trunk
label_desc: Use image node_id 2 for calling the ResNeXt obj's underlying member method code with example usage: obj.forward(x, out_feat_keys) and returns: out