class_docstr: Clip bounding box coordinates to image boundaries.
  If multiple images are supplied and padded, must have additional inputs
  of accurate image shape.
class_docstr_tok: ["Clip","bounding","box","coordinates","to","image","boundaries",".","If","multiple","images","are","supplied","and","padded",",","must","have","additional","inputs","of","accurate","image","shape","."]
docstr: If images are padded, must have additional inputs for clipping
  
  Parameters
  ----------
  x: (B, N, 4) Bounding box coordinates.
  img: (B, C, H, W) Image tensor.
  
  Returns
  -------
  (B, N, 4) Bounding box coordinates.
docstr_tok: ["If","images","are","padded",",","must","have","additional","inputs","for","clipping","Parameters","--","--","--","--","--","x",":","(","B",",","N",",","4",")","Bounding","box","coordinates",".","img",":","(","B",",","C",",","H",",","W",")","Image","tensor",".","Returns","--","--","--","-","(","B",",","N",",","4",")","Bounding","box","coordinates","."]
code: def hybrid_forward(self, F, x, img):
      """If images are padded, must have additional inputs for clipping
  
      Parameters
      ----------
      x: (B, N, 4) Bounding box coordinates.
      img: (B, C, H, W) Image tensor.
  
      Returns
      -------
      (B, N, 4) Bounding box coordinates.
  
      """
      x = F.maximum(x, 0.0)
      # window [B, 2] -> reverse hw -> tile [B, 4] -> [B, 1, 4], boxes [B, N, 4]
      window = (
          F.shape_array(img)
          .slice_axis(axis=0, begin=2, end=None)
          .expand_dims(0)
      )
      m = F.tile(F.reverse(window, axis=1), reps=(2,)).reshape(
          (0, -4, 1, -1)
      )
      return F.broadcast_minimum(x, F.cast(m, dtype="float32"))
  
imports: from __future__ import absolute_import
  import numpy
  from mxnet import gluon
label_desc: Use image node_id 2 for calling the BBoxClipToImage obj's underlying member method code with example usage: obj.hybrid_forward(F, x, img) and returns: F