tensorflow / graphics

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

No module named tensorflow_graphics.math.interpolation.trilinear #484

Open Goku1110 opened 3 years ago

Goku1110 commented 3 years ago

Hello,

when I try to call the trilinear interpolation method I get the following error:

ModuleNotFoundError: No module named 'tensorflow_graphics.math.interpolation.trilinear'

After inspecting the interpolation module it shows, that there is no trilinear module provided:

[..., ('bspline', <module 'tensorflow_graphics.math.interpolation.bspline' from '/usr/local/lib/python3.6/dist-packages/tensorflow_graphics/math/interpolation/bspline.py'>), ('division', _Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192)), ('print_function', _Feature((2, 6, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 65536)), ('slerp', <module 'tensorflow_graphics.math.interpolation.slerp' from '/usr/local/lib/python3.6/dist-packages/tensorflow_graphics/math/interpolation/slerp.py'>), ('weighted', <module 'tensorflow_graphics.math.interpolation.weighted' from '/usr/local/lib/python3.6/dist-packages/tensorflow_graphics/math/interpolation/weighted.py'>)]

A workaround would be to implement the trilinear module/functionality besides the tfg package. But it should definitely work out of the box with tfg.

Tested with tensorflow-graphics version: 2020.5.20 and tensorflow-graphics-gpu: 1.0.0. Running on tf 2.4.0

Has anyone faced the same issue?

Goku1110 commented 3 years ago

Fix

You can import the trilinear module as follows:

from tensorflow_graphics.math.interpolation.trilinear import interpolate as your_name