docstr: Upsample and add two feature maps.
  
  Args:
    x: (Tensor) top feature map to be upsampled.
    y: (Tensor) lateral feature map.
  
  Returns:
    (Tensor) added feature map.
  
  Note in PyTorch, when input size is odd, the upsampled feature map
  with `F.interpolate(..., scale_factor=2, mode='nearest')`
  maybe not equal to the lateral feature map size.
  
  e.g.
  original input size: [N,_,15,15] ->
  conv2d feature map size: [N,_,8,8] ->
  upsampled feature map size: [N,_,16,16]
  
  So we choose bilinear upsample which supports arbitrary output sizes.
docstr_tok: ["Upsample","and","add","two","feature","maps",".","Args",":","x",":","(","Tensor",")","top","feature","map","to","be","upsampled",".","y",":","(","Tensor",")","lateral","feature","map",".","Returns",":","(","Tensor",")","added","feature","map",".","Note","in","PyTorch",",","when","input","size","is","odd",",","the","upsampled","feature","map","with","`","F.interpolate","(","...",",","scale_factor=2",",","mode='nearest","'",")","`","maybe","not","equal","to","the","lateral","feature","map","size",".","e.g",".","original","input","size",":","[","N",",","_,15,15","]","-",">","conv2d","feature","map","size",":","[","N",",","_,8,8","]","-",">","upsampled","feature","map","size",":","[","N",",","_,16,16","]","So","we","choose","bilinear","upsample","which","supports","arbitrary","output","sizes","."]
code: def _upsample_add(x, y):
      """Upsample and add two feature maps.
  
      Args:
        x: (Tensor) top feature map to be upsampled.
        y: (Tensor) lateral feature map.
  
      Returns:
        (Tensor) added feature map.
  
      Note in PyTorch, when input size is odd, the upsampled feature map
      with `F.interpolate(..., scale_factor=2, mode='nearest')`
      maybe not equal to the lateral feature map size.
  
      e.g.
      original input size: [N,_,15,15] ->
      conv2d feature map size: [N,_,8,8] ->
      upsampled feature map size: [N,_,16,16]
  
      So we choose bilinear upsample which supports arbitrary output sizes.
      """
      _, _, H, W = y.size()
      return F.interpolate(x, size=(H, W), mode="bilinear") + y
  
file_path: pywick/pywick/models/localization/fpn.py
imports: import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 3 for calling the FPN obj's underlying member method code with example usage: obj._upsample_add(x, y) and returns: unknown