parameters: (tensor, pad_shape)
return_statement: return tensor
docstring: Clip boxes of the pad area.
          :param tensor: [n, c, H, W]
          :param pad_shape: [h, w]
          :return: [n, c, h, w]
docstring_summary: Clip boxes of the pad area.
          :param tensor: [n, c, H, W]
          :param pad_shape: [h, w]
          :return: [n, c, h, w]
docstring_tokens: Clip boxes of the pad area . : param tensor : [ n c H W ] : param pad_shape : [ h w ] : return : [ n c h w ]
function: def _clip_pad(tensor, pad_shape):
          """
          Clip boxes of the pad area.
          :param tensor: [n, c, H, W]
          :param pad_shape: [h, w]
          :return: [n, c, h, w]
          """
          H, W = tensor.shape[2:]
          h, w = pad_shape
  
          if h < H or w < W:
              tensor = tensor[:, :, :h, :w].copy()
  
          return tensor
function_tokens: def _clip_pad ( tensor , pad_shape ) : H , W = tensor . shape [ 2 : ] h , w = pad_shape if h < H or w < W : tensor = tensor [ : , : , : h , : w ] . copy ( ) return tensor