class_docstr: Geometry
class_docstr_tok: ["Geometry"]
code: def interpolate4d(tensor4d, size):
      bsz, h1, w1, h2, w2 = tensor4d.size()
      ha, wa, hb, wb = size
      tensor4d = tensor4d.view(bsz, h1, w1, -1).permute(0, 3, 1, 2)
      tensor4d = F.interpolate(
          tensor4d, (ha, wa), mode="bilinear", align_corners=True
      )
      tensor4d = tensor4d.view(bsz, h2, w2, -1).permute(0, 3, 1, 2)
      tensor4d = F.interpolate(
          tensor4d, (hb, wb), mode="bilinear", align_corners=True
      )
      tensor4d = tensor4d.view(bsz, ha, wa, hb, wb)
  
      return tensor4d
  
imports: import torch.nn.functional
label_desc: Use image node_id 1 for calling the Geometry obj's underlying member method code with example usage: obj.interpolate4d(tensor4d, size) and returns: tensor4d