remove line in erode

This commit is contained in:
Ethan Weber committed 2023-08-04 15:36:17 +00:00
1 parent fb5afb91ad
commit 11e16e65c7
1 file changed
-1
@@ -44,7 +44,6 @@ def erode(tensor: Float[Tensor, "bs 1 H W"], kernel_size=3) -> Float[Tensor, "bs
if any(val not in (0, 1) for val in unique_vals) or tensor.dtype != torch.float32:
raise ValueError("Input tensor should contain only values 0 and 1, and should have dtype torch.float32.")
x = 1 - tensor
x = 1 - dilate(1 - tensor, kernel_size=kernel_size)
# set edge pixels to 0
p = (kernel_size - 1) // 2