(img: Tensor,
          i: int,
          j: int,
          h: int,
          w: int,
          v: Tensor,
          inplace: bool=False)
return img
Erase the input Tensor Image with given value.
    This transform does not support PIL Image.

    Args:
        img (Tensor Image): Tensor image of size (C, H, W) to be erased
        i (int): i in (i,j) i.e coordinates of the upper left corner.
        j (int): j in (i,j) i.e coordinates of the upper left corner.
        h (int): Height of the erased region.
        w (int): Width of the erased region.
        v: Erasing value.
        inplace(bool, optional): For in-place operations. By default is set False.

    Returns:
        Tensor Image: Erased image.
Erase the input Tensor Image with given value.
    This transform does not support PIL Image.
Erase the input Tensor Image with given value . This transform does not support PIL Image .
def erase(img: Tensor,
          i: int,
          j: int,
          h: int,
          w: int,
          v: Tensor,
          inplace: bool=False) -> Tensor:
    """ Erase the input Tensor Image with given value.
    This transform does not support PIL Image.

    Args:
        img (Tensor Image): Tensor image of size (C, H, W) to be erased
        i (int): i in (i,j) i.e coordinates of the upper left corner.
        j (int): j in (i,j) i.e coordinates of the upper left corner.
        h (int): Height of the erased region.
        w (int): Width of the erased region.
        v: Erasing value.
        inplace(bool, optional): For in-place operations. By default is set False.

    Returns:
        Tensor Image: Erased image.
    """
    if not isinstance(img, torch.Tensor):
        raise TypeError('img should be Tensor Image. Got {}'.format(type(img)))

    if not inplace:
        img = img.clone()

    img[..., i:i + h, j:j + w] = v
    return img
def erase ( img : Tensor , i : int , j : int , h : int , w : int , v : Tensor , inplace : bool = False ) -> Tensor : if not isinstance ( img , torch . Tensor ) : raise TypeError ( 'img should be Tensor Image. Got {}' . format ( type ( img ) ) ) if not inplace : img = img . clone ( ) img [ ... , i : i + h , j : j + w ] = v return img