Open dncnbuck opened 2 years ago
Please send us a pull request for those new torch ops and patches. Those would be great to add.
Without having those changes, I can't reproduce your issue. So it's difficult for me to be helpful. I would check the conditional in your network. It sounds like the two branches are not producing the same output type.
Ok, I'll put the changes into a PR so we can work from the same ops.
πDescribe the bug
Attempting to convert the pytorch based d2go maskrcnn model with FBNETV2C4Backbone (https://github.com/facebookresearch/d2go/blob/main/configs/mask_rcnn_fbnetv3a_C4.yaml) to coreml.
Conversion to MIL successful
with a number of torch ops needing to be added, and some with minor patches (I'll list these at the end).
However the model runs into an unknown error when compiling the model
"compiler error: Unknown error in building network shapes."
I've noticed if I convert the model with the
convert_to=mlprogram
that the error changes to"compiler error: Encountered an error while compiling a neural network model: in operation of type cond: cond must return same types from both branches"
Stack Trace
but changes to
when using
convert_to=mlprogram
when converting the model.To Reproduce
I've not been able to isolate the layer causing this issue in the translation of MIL to NN, but would be very happy to dig deeper and try and find a minimal example. IF there are some suggestions on how I might be able to do this that would be rerally appreciated.
I'm running a basic conversion script
System environment (please complete the following information):
Additional context
added torch ops
ops with minor patches