any of these should work: torch.div, /.
In [1]: import torch

In [2]: a = torch.randn(3, 4)

In [3]: b = torch.randn(3, 4)

In [4]: c = torch.div(a, b)

In [5]: c = a / b


It’s weird that they dont. Can you print type(input_patch) and type(c) before running torch.div and see if there’s something amiss?