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

Exported saved_model.pb in tensorflow 1.x with op from tf.contrib "ImageProjectiveTransformV2" doesn't work with tf-addons #656

Closed
Bakaizhamgyrchiev opened this issue Nov 1, 2019 · 2 comments

Comments

@Bakaizhamgyrchiev
Copy link

Bakaizhamgyrchiev commented Nov 1, 2019

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04):fedora 30
  • TensorFlow version and how it was installed (source or binary):binary
  • TensorFlow-Addons version and how it was installed (source or binary):binary
  • Python version:3.7
  • Is GPU used? (yes/no):no

I exported in tf 1.x saved_model. It includes op tf.contrib.image.transform ("ImageProjectiveTransformV2")

In tf 1.x before loading this saved_model I always import tensorflow.contrib (lazy loading)

So, I can't load this saved_model in tf 2.0 with importing tensorflow-addons
There is error:

NotFoundError: Op type not registered 'ImageProjectiveTransformV2' in binary running on train2.oz-services.ru. Make sure the Op and Kernel are registered in the binary running in this process. Note that if you are loading a saved graph which used ops from tf.contrib, accessing (e.g.) tf.contrib.resampler should be done before importing the graph, as contrib ops are lazily registered when the module is first accessed.

I have found that in

REGISTER_KERNEL_BUILDER(Name("Addons>ImageProjectiveTransformV2") \

name "ImageProjectiveTransformV2" was replaced with "Addons>ImageProjectiveTransformV2".

Does it mean that I can't load this saved_model in tf2.0 and tensorflow-addons?

And if I add image custom ops from tensorflow-addons to tensorflow serving BUILD it also doesnt work with previous error

I watched #86

@Bakaizhamgyrchiev
Copy link
Author

Bakaizhamgyrchiev commented Nov 1, 2019

So, I understood that I should use tensorflow-addons<0.6

@seanpmorgan
Copy link
Member

Thanks @Bakaizhamgyrchiev per this new RFC:
tensorflow/community#126

We've been asked to append package names on all of our custom ops to avoid collisions. Unfortunately this will be an issue for models with the older op names. as you mentioned TFA <0.6 should have compatible names.

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

2 participants