Closed asusdisciple closed 3 months ago
The torch.ops.torchvision.nms
function called here
isn't implemented in Python. It's implemented in C++ as a custom op, and it gets automatically exposed (bound) in Python as torch.ops.torchvision.nms
by the PyTorch custom op mechanism (it's a convention that these ops get exposed as torch.ops.*
, read more here).
HTH
🐛 Describe the bug
I am looking for a method in torch, but for the love of god I can not not find the function definition! The reason I need to find it is that I need to get rid of the torch dependency and I want to try to convert it into numpy.
I am speaking about torchvision.ops.nms() This method is located in torchvision/ops/boxes.py and returns torch.ops.torchvision.nms().
This method is generated code which can be found in torch/_ops.py where they initialize ops with ops: _Ops = _Ops().
Thats the point where I am lost, the class is located in the same file, but I cant figure out which library it calls to get the nms() method.
Please help me :frowning:
Versions
Latest