question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

transform: undefined symbol: _ZNK10tensorflow15shape_inference16InferenceContext11DebugStringEv

See original GitHub issue

System information

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

Describe the bug I get an error when applying a transform using tfa.image.transform

Code to reproduce the issue

some_image_path = '/path/to/an/image'
with open(some_image_path, 'rb') as f:
    image = tf.io.decode_image(f.read())

ops = tfa.image.transform_ops.angles_to_projective_transforms(90, image.shape[0], image.shape[1])
image = tfa.image.transform(image, ops)

Other info / logs

Traceback (most recent call last):
  File "/home/nicolas/.anaconda3/envs/posenet/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3331, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-24-2e958d55097f>", line 1, in <module>
    tfa.image.transform(image, ops)
  File "/home/nicolas/.anaconda3/envs/posenet/lib/python3.7/site-packages/tensorflow_core/python/eager/def_function.py", line 568, in __call__
    result = self._call(*args, **kwds)
  File "/home/nicolas/.anaconda3/envs/posenet/lib/python3.7/site-packages/tensorflow_core/python/eager/def_function.py", line 615, in _call
    self._initialize(args, kwds, add_initializers_to=initializers)
  File "/home/nicolas/.anaconda3/envs/posenet/lib/python3.7/site-packages/tensorflow_core/python/eager/def_function.py", line 497, in _initialize
    *args, **kwds))
  File "/home/nicolas/.anaconda3/envs/posenet/lib/python3.7/site-packages/tensorflow_core/python/eager/function.py", line 2389, in _get_concrete_function_internal_garbage_collected
    graph_function, _, _ = self._maybe_define_function(args, kwargs)
  File "/home/nicolas/.anaconda3/envs/posenet/lib/python3.7/site-packages/tensorflow_core/python/eager/function.py", line 2703, in _maybe_define_function
    graph_function = self._create_graph_function(args, kwargs)
  File "/home/nicolas/.anaconda3/envs/posenet/lib/python3.7/site-packages/tensorflow_core/python/eager/function.py", line 2593, in _create_graph_function
    capture_by_value=self._capture_by_value),
  File "/home/nicolas/.anaconda3/envs/posenet/lib/python3.7/site-packages/tensorflow_core/python/framework/func_graph.py", line 978, in func_graph_from_py_func
    func_outputs = python_func(*func_args, **func_kwargs)
  File "/home/nicolas/.anaconda3/envs/posenet/lib/python3.7/site-packages/tensorflow_core/python/eager/def_function.py", line 439, in wrapped_fn
    return weak_wrapped_fn().__wrapped__(*args, **kwds)
  File "/home/nicolas/.anaconda3/envs/posenet/lib/python3.7/site-packages/tensorflow_core/python/framework/func_graph.py", line 968, in wrapper
    raise e.ag_error_metadata.to_exception(e)
tensorflow.python.framework.errors_impl.NotFoundError: in converted code:
    /home/nicolas/.anaconda3/envs/posenet/lib/python3.7/site-packages/tensorflow_addons/image/transform_ops.py:110 transform  *
        output = _image_so.ops.addons_image_projective_transform_v2(
    /home/nicolas/.anaconda3/envs/posenet/lib/python3.7/site-packages/tensorflow_addons/utils/resource_loader.py:49 ops
        self._ops = tf.load_op_library(get_path_to_datafile(self.relative_path))
    /home/nicolas/.anaconda3/envs/posenet/lib/python3.7/site-packages/tensorflow_core/python/framework/load_library.py:57 load_op_library
        lib_handle = py_tf.TF_LoadLibrary(library_filename)
    NotFoundError: /home/nicolas/.anaconda3/envs/posenet/lib/python3.7/site-packages/tensorflow_addons/custom_ops/image/_image_ops.so: undefined symbol: _ZNK10tensorflow15shape_inference16InferenceContext11DebugStringEv

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
DanielTakeshicommented, Aug 25, 2020

Quick update: I upgraded tensorflow-addons:

conda install tensorflow-gpu==2.2
pip install tensorflow-addons==0.11.1

and now the error message disappears. @seanpmorgan Was this expected?

1reaction
seanpmorgancommented, Jun 14, 2020

Hi @DanielTakeshi unforuntely no change yet. Still waiting on the RFC in the issue linked above: https://github.com/tensorflow/addons/issues/987

For now you’ll need to use TF that is pip installed. We’ll be working to improve our support for TFA installed from source in the coming month(s)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Undefined symbol error when using tf2_ros::BufferInterface
I'm trying to use the tf2_ros::BufferInterface::transform method on a PointCloud2 message like so ( tf_buffer_ is a tf2_ros::Buffer object):
Read more >
Undefined symbol error when using tensorflow addons image ...
I am trying to use tensorflow addons to do image affine transformation and I'm getting strange errors. I ...
Read more >
Undefined Symbols (Linker and Libraries Guide)
These symbol references are referred to as undefined symbols. Undefined symbols can affect the link-edit process according to the type of symbol, together...
Read more >
undefined symbols in libomapi (#32) · Issues - dhcp - GitLab
undefined symbols in libomapi. Describe the bug. Calling dhclient fails here with. dhclient: symbol lookup error: /usr/lib/libomapi.so.0: ...
Read more >
shell script - heif-convert: symbol lookup error: undefined ...
I have run heif-convert successfully not long ago but now I get this error: >heif-convert bob.heic bob.jpeg heif-convert: symbol lookup ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found