Add torch ops for d2go models
added torch ops
nms
repeat_interleave
numel
roi_align
logicaland
ops with minor patches
clamp
narrow
index - handle broadcasting indicies
max - inputs are len == 1
split - handle case when num_splits == 1
to - handle the case where the dtype is not set, this should be inferred from the Tensor dtype. see, https://pytorch.org/docs/stable/generated/torch.Tensor.to.html?highlight=#torch.Tensor.to
tupleunpack - handle case when len(output) == 1
these were added in order to make progress with a conversion of pytorch Mask-RCNN model from d2go / detectron2.
Form more details see: https://github.com/apple/coremltools/issues/1505#issuecomment-1148436445
@TobyRoseman "We need unit tests for the bug fixes and the new ops. @dncnbuck - can you add that?"
Yeah good point. I'll be able to add these but this might not happen today sadly. I'll try to get to it this week 😄
I'll be able to add these but this might not happen today sadly. I'll try to get to it this week 😄
No worries about the timing. Let me know if you have any questions when adding the unit tests.
@dncnbuck did you manage to fix this issue by any chance? I will be thankful for your response
@TobyRoseman sorry this dropped off of my radar these last months. I've updated the Pr to include some tests for ops and removed the repeat interleave op implementation for the time being as it was not implemented well enough so I will hold out on adding that until I can give it some time
@dncnbuck - no worries about this falling off your radar. Thanks for getting back to it.
Please rebase this pull request on top of main. Then I will kick off a CI run.
Has this PR been included? i.e. is it possible to convert d2go models to coreml?
Has this PR been included? i.e. is it possible to convert d2go models to coreml?
+1 would love to know the status on this PR, adding these ops would be a huge benefit to me
Has this PR been included? i.e. is it possible to convert d2go models to coreml?
+1 would love to know the status on this PR, adding these ops would be a huge benefit to me
So has anyone successfully converted a detectron2 / d2go model to coreml? I have been struggling with this as using cocoapods are not ideal for me.