erase¶ torchvision.transforms.functional.erase(img: Tensor, i: int, j: int, h: int, w: int, v: Tensor, inplace: bool = False) → Tensor[原始碼]¶ 使用給定值擦除輸入的 Tensor 影像。 此轉換不支援 PIL Image。 參數: img (Tensor 影像) – 要擦除的大小為 (C, H, W) 的 Tensor 影像 i (int) – (i,j) 中的 i,即左上角的座標。 j (int) – (i,j) 中的 j,即左上角的座標。 h (int) – 擦除區域的高度。 w (int) – 擦除區域的寬度。 v – 擦除值。 inplace (bool, optional) – 是否進行原地操作。預設值為 False。 回傳值: 已擦除的圖片。 回傳值型別: Tensor Image(張量圖片)