Closed Spiess closed 5 years ago
I forgot to mention: I have observed this issue for precompiled TensorFlow Scala 0.4.1 and current TensorFlow Scala compiled with TensorFlow r1.12.
I was able to fix the issue by compiling the custom operation using tf-nightly-gpu==1.13.0.dev20181121
.
Is there any way to tell with which version/nightly a given TensorFlow Scala release has been compiled? Because I had to guess that nightly from the release date.
I am using the
rasterize_triangles_kernel.so
operation from https://github.com/google/tf_mesh_renderer (commit a6403fbb36a71443ecb822e435e5724550d2b52b) in one of my projects.Running it in Python works without problems:
To get it to even load and register correctly in TensorFlow Scala, I have had to compile it using the TensorFlow nightly build and add the following shape function:
While it still works in Python, in TensorFlow Scala trying to run it crashes with a segfault. I have discovered that this is the case because, while the shapes of the operation inputs that arrive in the C++ code through the OpKernelContext are correct, the input data is completely wrong.
The following is my test code:
The values passed through the OpKernelContext are all 1 for the vertices input and all 1065454216 for triangles in my tests.