You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Coremltools can't reshape a tensor from rank 4 to rank 6. For example, it can't reshape [1, 96, 28, 28] to [1, 96, 14, 2, 14, 2] using torch.reshape. The compilation is finished correctly but I can't measure the performance of this model from Xcode because of the following warning :
"RuntimeWarning: You will not be able to run predict() on this Core ML model. Underlying exception message was: {
NSLocalizedDescription = "Error in declaring network.";"
You should be able to get around the rank 5 limitation by reshaping your tensors.
Having a coremltools GitHub issue for this does not make sense. This issue can not be fixed in the coremltools repository. This will require changes to the Core ML framework. Please use Feedback Assistant to submit feature requests for the Core ML framework.
This will require changes to the Core ML framework. Please use Feedback Assistant to submit feature requests for the Core ML framework.
No one ever responds there. I think CoreMLTools team can ask CoreML team to implement this feature and they will give it a high priority as well. You guys have more power than a random developer suggesting a feature.
Reacted by Abdelrahman Shaker, Jaykob, Serkan , Fater7 and Jinfu Liu
Activity
TobyRoseman commentedon Jan 9, 2023
Core ML does not support tensors with a rank greater than five.
Since this is issue with the Core ML Framework, not the coremltools Python package, I'm going to close this issue.
RahulBhalley commentedon Jan 13, 2023
This feature is needed as
upfirdn2d_native()in StyleGAN2 requires reshaping tensor to a 6 rank tensor. Following is the implementation in PyTorch.Can you @TobyRoseman suggest some alternative approach to reshaping tensor to bypass such rank error in CoreML?
RahulBhalley commentedon Jan 13, 2023
We should reopen this issue until we have a solution because this is definitely a required feature.
TobyRoseman commentedon Jan 14, 2023
You should be able to get around the rank 5 limitation by reshaping your tensors.
Having a coremltools GitHub issue for this does not make sense. This issue can not be fixed in the coremltools repository. This will require changes to the Core ML framework. Please use Feedback Assistant to submit feature requests for the Core ML framework.
RahulBhalley commentedon Jan 14, 2023
I don't understand how? Can you suggest a code? I've shared the function.
RahulBhalley commentedon Jan 14, 2023
No one ever responds there. I think CoreMLTools team can ask CoreML team to implement this feature and they will give it a high priority as well. You guys have more power than a random developer suggesting a feature.