I recently trained an object detection model on Google's Vision platform and exported it to a TensorFlow Lite edge model.
I receive this error in Xcode when running on an iOS device with a CoreML delegate:
validator error: Padding type for the pooling layer 'PoolingLayerBuilder (MEAN)_1' is not set.
When running on iOS using TensorFlow lite with a CoreML delegate I get this error:
Error compiling model Error reading protobuf spec. validator error: Padding type for the pooling layer 'PoolingLayerBuilder (MEAN)_1' is not set.
Here's what I've tried so far:
- Updating my pods to make sure I'm on the TensorFlowLiteSwift nightly build
- Running on CPU only (the model works, so I know its a CoreML delegate problem)
- Making sure CoreMLDelegate is using the latest version of CoreML (3)
Next Steps?
Try to modify the TFLite file itself to set the padding type for the pooling layer somehow. It's not obvious how to do this
Try to modify the CoreML delegate to set the padding type to a default? Somewhere in this file? https://github.com/tensorflow/tensorflow/blob/nightly/tensorflow/lite/delegates/coreml/builders/pooling_layer_builder.cc#L54
Is that the right approach or is there an easier solution I'm not seeing?