I'd like to use Watson Visual Recognition to generate a CoreML model which can be converted via this project into a TensorFlow model, so that I can run it on Android.
root@a14232b63639:/volume# python import.py
Traceback (most recent call last):
File "import.py", line 4, in <module>
tf_rep = prepare(model)
File "/usr/local/lib/python2.7/dist-packages/onnx_tf/backend.py", line 345, in prepare
super(TensorflowBackendBase, cls).prepare(model, device, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/onnx/backend/base.py", line 65, in prepare
onnx.checker.check_model(model)
File "/usr/local/lib/python2.7/dist-packages/onnx/checker.py", line 82, in check_model
C.check_model(model.SerializeToString())
onnx.onnx_cpp2py_export.checker.ValidationError: Conv.W in initializer but not in graph input
This is my import script:
import onnx
from onnx_tf.backend import prepare
model = onnx.load('/volume/DefaultCustomModel_2132124965.onnx')
tf_rep = prepare(model)
In order to run the script, I use Docker:
docker run -v /Users/nheidloff/Desktop/play/volume:/volume -it tensorflow/tensorflow:1.7.1-devel bash
I'd like to use Watson Visual Recognition to generate a CoreML model which can be converted via this project into a TensorFlow model, so that I can run it on Android.
I've used this Watson sample to create the CoreML model: https://github.com/watson-developer-cloud/visual-recognition-coreml
Next I converted the model to ONNX via this tutorial: https://github.com/onnx/onnxmltools
When running the import script, I get this error:
This is my import script:
In order to run the script, I use Docker:
In the container I invoke these commands:
Any help is appreciated !