Problem:
I am facing issue problem when I load a model trained from tensorflow 1 that has tf.contrib.resampler
using tensorflow 2.
Here is the following error I got.
tensorflow.python.framework.errors_impl.NotFoundError: Op type not registered 'Resampler' in binary running on MY-PC. 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.
A little bit of history, as per tensorflow 2.0, the tf.contrib
module is not officially supported and is moved to tensorflow_addons. So, I thought just changing it to the tensorflow_addons would solve it
What I tried
I already tried adding import tensorflow_addons.image.resampler_ops
(probably the tf2 equivalent of running tf.contrib.resampler
to lazy load the OP)
Potential issue comes from the registered OP name, which is REGISTER_OP("Addons>Resampler")
in the tf2/tensorflow_addons, but it's REGISTER_OP("Resampler")
in the tf1/tf.contrib
Question
Is there any easy way to rename the existing OP or make an alias to the existing OP so that it's easier to find "Resampler"
OP?
tfa.image.resampler()
library. For more details about this library find here. Thanks! – TFer Jan 29 at 3:19