Skip to content

Commit

Permalink
call to contiguous
Browse files Browse the repository at this point in the history
  • Loading branch information
Isalia20 committed Aug 27, 2024
1 parent 08a03cc commit 16eb73f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kornia/morphology/morphology.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def erosion(
neighborhood[kernel == 0] = -max_val

if engine == "unfold":
output = output.unfold(2, se_h, 1).unfold(3, se_w, 1)
output = output.unfold(2, se_h, 1).unfold(3, se_w, 1).contiguous()
output, _ = torch.min(output.sub_(neighborhood), 4)
output, _ = torch.min(output, 4)
elif engine == "convolution":
Expand Down

0 comments on commit 16eb73f

Please sign in to comment.