(tensor, pad_shape)
return tensor
Clip boxes of the pad area.
        :param tensor: [n, c, H, W]
        :param pad_shape: [h, w]
        :return: [n, c, h, w]
Clip boxes of the pad area.
        :param tensor: [n, c, H, W]
        :param pad_shape: [h, w]
        :return: [n, c, h, w]
Clip boxes of the pad area . : param tensor : [ n c H W ] : param pad_shape : [ h w ] : return : [ n c h w ]
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
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