Failed to load model converted from tensorflow in iOS/Swift, but works in Python
- Dominant language
- Python
- Stars
- 5.4k
- Forks
- 850
- Avg merge
- 4d 5h
- Merged PRs (30d)
- 10
Description
When I load my model in python, I don't get any error. Even Xcode is able to detect the model metadata. However, when I load the model with CoreML, I get this error:
```
StatefulPartitionedCall_StatefulPartitionedCall_StatefulPartitionedCall_freq_analyser_StatefulPartitionedCall_multi_conv_1_conv2d_multiconv_same_1_Conv2D_1_cast_fp16_to_fp32 is neither a function input nor is produced by any OperationBuilder in this block..
```
I tried converting the model using tf v2.12 and tf v2.18, with the same results
Contributor guide
Research direction
Start by reproducing the Python conversion with TensorFlow 2.12 and 2.18, then load the converted model in Xcode with CoreML. Compare the conversion and loading results around the reported OperationBuilder error; done means the converted model loads successfully in iOS without that error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, swift, tensorflow
- Domain
- machine-learning, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100