Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsupported Ops of type: PlaceholderWithDefault #99

Closed
sieuwe1 opened this issue Jan 4, 2018 · 3 comments
Closed

Unsupported Ops of type: PlaceholderWithDefault #99

sieuwe1 opened this issue Jan 4, 2018 · 3 comments

Comments

@sieuwe1
Copy link

sieuwe1 commented Jan 4, 2018

Hello

I am having this error message:

dyld: warning, LC_RPATH $ORIGIN/../../_solib_darwin_x86_64/_U_S_Stensorflow_Spython_C_Upywrap_Utensorflow_Uinternal.so___Utensorflow in /Library/Python/2.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so being ignored in restricted program because it is a relative path 2018-01-04 19:47:30.977648: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.2 AVX Traceback (most recent call last): File "co.py", line 15, in <module> image_scale = 2.0/255.0) File "/Library/Python/2.7/site-packages/tfcoreml/_tf_coreml_converter.py", line 478, in convert predicted_probabilities_output=predicted_probabilities_output) File "/Library/Python/2.7/site-packages/tfcoreml/_tf_coreml_converter.py", line 143, in _convert_pb_to_mlmodel _check_unsupported_ops(OPS, output_feature_names) File "/Library/Python/2.7/site-packages/tfcoreml/_tf_coreml_converter.py", line 111, in _check_unsupported_ops ','.join(unsupported_op_types))) NotImplementedError: Unsupported Ops of type: PlaceholderWithDefault

When i am trying to convert a tensorflow model i trained with tensorflow for poets to a CoreML model. I am using this as python code:

`import tfcoreml as tf_converter

tf_model_path = "retrained_graph.pb"
mlmodel_path = "mobilenet_v1_1.0_224.mlmodel"

mlmodel = tf_converter.convert(
tf_model_path = tf_model_path,
mlmodel_path = mlmodel_path,
output_feature_names = ["MobilenetV1/Predictions/Softmax:0"],
input_name_shape_dict = {"input:0":[1,224,224,3]},
image_input_names = ["input:0"],
red_bias = -1,
green_bias = -1,
blue_bias = -1,
image_scale = 2.0/255.0)
`

Machine: mac OS Sierra

Hope you can help me.

Greetings Sieuwe

@nivim
Copy link

nivim commented Jan 6, 2018

Had the same issue, you will need to uninstall the current package and reinstall from source (not from pip) - the explanations are at the readme file.

@icappsCedric
Copy link

installing it that way as you said, did not fix the issue

@sieuwe1
Copy link
Author

sieuwe1 commented Jan 12, 2018

Hey

I eventually got it working. I am not 100% sure what fixed it but it was probably something to do with that i have 2 python versions installed. Python2.7 and python3.6. To fix it I did:

Uninstalling tensorflow and tfcoreml from pip and from pip3.
Installing tfcoreml and tensorflow with pip not pip3.
Uninstalling and installing numpy with pip(this gave me some errors while doing but got it eventually uninstalled)

If it still wont work mayby try to build tfcoreml and tensorflow from source. Like @nivm said.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants