tensorflow / graphics

TensorFlow Graphics: Differentiable Graphics Layers for TensorFlow
Apache License 2.0
2.75k stars 361 forks source link

ImportError: cannot import name 'gen_rasterizer_op' when trying to import tensorflow_graphics.rendering.opengl.triangle_rasterizer #431

Open Lynne-Zheng-Linfang opened 4 years ago

Lynne-Zheng-Linfang commented 4 years ago

Hi, I am new in tensorflow, and when I trying to import tensorflow_graphics.rendering.opengl.triangle_rasterizer, the following error shows:

import tensorflow as tf
import tensorflow_graphics.rendering.opengl.triangle_rasterizer as tr

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
 in ()
      1 import tensorflow as tf
----> 2 import tensorflow_graphics.rendering.opengl.triangle_rasterizer as tr

/home/linfang/.local/lib/python3.6/site-packages/tensorflow_graphics/rendering/opengl/triangle_rasterizer.py in ()
     26 import tensorflow.compat.v2 as tf
     27 
---> 28 from tensorflow_graphics.rendering.opengl import gen_rasterizer_op as render_ops
     29 from tensorflow_graphics.rendering.opengl import math as glm
     30 from tensorflow_graphics.util import export_api

ImportError: cannot import name 'gen_rasterizer_op'

I am using Ubuntu 18.04, and version info: tensorflow-gpu 2.2.0 tensorflow-graphics 2020.5.20 How can I solve it? Thanks a lot

cosw0t commented 4 years ago

There's a fix in this pull request: #411