code: def forward(self, x):
      _, _, h, w = x.shape
      features = [x]
      skip_feat = {"x1": x}
      for k, v in self.base_model._modules.items():
          # ignore classification head
          if "fc" in k or "avgpool" in k:
              continue
          feature = v(features[-1])
          features.append(feature)
          if any(x in k for x in self.skip_feature_names):
              _, _, fh, fw = feature.shape
              skip_feat[f"x{int(h/fh)}"] = feature
      return skip_feat
  
file_path: ARKitScenes/depth_upsampling/models/mspf/densenet.py
imports: from collections import OrderedDict
  from typing import Tuple
  import torch
  import torch.nn.functional
  from torch import nn, Tensor
  from models.mspf.blocks.dense_net import _DenseBlock, _Transition
label_desc: Use image node_id 2 for calling the DenseNet121 obj's underlying member method code with example usage: obj.forward(x) and returns: skip_feat