Open vedashreep opened 4 years ago
The runtime engine only support up to rank 5 at the moment. Can you check (using netron or programmatically) which layers have weights or input tensor with rank >5? With that additional info it'd be easier to route to the right person within Apple to see if there's anything we can do in the short term.
@daiwei89
Just went into the same issue.
Imagine if you have an image tensor [b, c, h, w]. Then you want to do a sliding window to get image patches. Currently, you have to do two sliding windows operations on two different axes. Which should give you [b, c, h, i, w, j]. This needs rank 6!
The same problem was encountered when converting large models such as YOLOv4. Currently, my workaround is reshaping any tensors below five ranks.
❓Question
I am trying to train an updatable coreml model on the device. The model is a classification model trained on 6 classes and accepts an input of shape (1,3). I could successfully convert the model from Keras and run predictions on it. However, when trying to train the model on the device I get the following error: [espresso] Training kernels not enabled for engine: 100 libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: Invalid rank: 6 Not sure where I am going wrong.
Attaching a screenshot of the mlmodel .
System Information
MacOS Catalina (10.15.6) Xcode 11.2.1 iOS 13.3 Coremltools 4.0b2 Python 3.7 Tensorflow 2.2