Skip to content

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

Closed
@Bakaizhamgyrchiev

Description

@Bakaizhamgyrchiev

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions