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

Segmentation fault when using tfa.rotate in tf-nightly #1277

Closed
bw0248 opened this issue Mar 10, 2020 · 3 comments · Fixed by #1281
Closed

Segmentation fault when using tfa.rotate in tf-nightly #1277

bw0248 opened this issue Mar 10, 2020 · 3 comments · Fixed by #1281

Comments

@bw0248
Copy link

bw0248 commented Mar 10, 2020

System information

  • OS Platform: Linux Ubuntu 18.04.3 LTS
  • TensorFlow version: tf-nightly (2.2.0-dev20200310) installed with pip
  • TensorFlow-Addons version: 0.8.3 (pip) and tfa-nightly (0.9.0-dev; pip)
  • Python version: 3.6.9
  • Is GPU used?: yes

Describe the bug
I currently have to use tf-nightly because of a separate issue. When I use tfa.rotate I get a segmentation fault. Behavior is the same with tfa 0.8.3 and tfa-nightly.

Code to reproduce the issue

import tensorflow as tf
import tensorflow_addons as tfa

img = tf.io.read_file(IMG_PATH)
img = tf.image.decode_png(img)
print(img.shape)
img = tfa.image.rotate(img, 90)

Output:

(128, 128, 3)
Segmentation fault (core dumped)

I also tried interpolation="BILINEAR". Problem is the same.

@gabrieldemarmiesse
Copy link
Member

Segfaults are normal when using tfa with tensorflow nightly. Tensorflow Addons is built against tensorflow 2.1.0 stable. Since the ABI is not stable from version from version to version, people get segfaults when using it with other tensorflow versions than the 2.1.0.

Can you install tensorflow 2.1.0 and tell us if the error still occurs?

@bw0248
Copy link
Author

bw0248 commented Mar 10, 2020

Ah ok, thanks for your quick reply.
I can confirm that it works without issues with tensorflow 2.1.0.

@gabrieldemarmiesse
Copy link
Member

I understand that the fact that we're targeting TF stable is not obvious, you're not the first person raising an issue like that. So there is a problem on our side.

We need to do a better job at checking the tensorflow version and tell users that something is wrong.

Just leaving them with a segmentation is not good enough. I'll open a pull request for that. Sorry about the trouble.

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

Successfully merging a pull request may close this issue.

2 participants