in principle the canny operator should work with back propagation
https://kornia.readthedocs.io/en/latest/filters.html?highlight=canny#kornia.filters.canny 1
see also: kornia/test_canny.py at 0deb07968053a6f6dea38754b4167498ad59e7b7 · kornia/kornia · GitHub