optas / latent_3d_points

Auto-encoding & Generating 3D Point-Clouds.
Other
506 stars 109 forks source link

Compiled c++ and imported library successfully but ops are not available from python. #8

Open cooltopics opened 6 years ago

cooltopics commented 6 years ago

Hi! Many thanks for sharing this wonderful implementation. I am having a particular problem while running your code (and probably while building it).

I am using tensorflow 1.3.1 on windows 64bit. I have seemingly successfully built your external folder structural_losses with changes for compiling with Visual Studio 2015 and Cuda 8.0.

I am also able to load the ops dlls e.g. using approxmatch_module = tf.load_op_library(osp.join(base_dir, '_approxmatch.pyd'))

However, I don't see the operators approxmatch_module.approx_match,approxmatch_module.match_cost, etc. from the c++ getting exposed to the python tensorflow.

I am getting the following error: AttributeError: 'module' object has no attribute 'approx_match'

When I do the following

from structural_losses import approxmatch
dir(approxmatch.approxmatch_module)

it lists only the following items ['LIB_HANDLE', 'OP_LIST', '_InitOpDefLibrary', '__builtins__', '__doc__', '__name__', '__package__', '_collections', '_common_shapes', '_op_def_lib', '_op_def_library', '_op_def_pb2', '_op_def_registry', '_ops']

where the actual operations from c++ are missing.

From the compiled shared library, using dependency walker, I see that the following there items are exposed through the dll (i.e. pyd):

char const * const tensorflow::DEVICE_CPU
char const * const tensorflow::DEVICE_GPU
char const * const tensorflow::DEVICE_SYCL

Am I missing anything to get it properly compiled?

Thanks.

ingutbecker commented 4 years ago

I am having the same problem. Did you find a solution?