autonomousvision / differentiable_volumetric_rendering

This repository contains the code for the CVPR 2020 paper "Differentiable Volumetric Rendering: Learning Implicit 3D Representations without 3D Supervision"
http://www.cvlibs.net/publications/Niemeyer2020CVPR.pdf
MIT License
794 stars 90 forks source link

Building extension error: 'isnan' is not declared in this scope #39

Closed LeoZDong closed 3 years ago

LeoZDong commented 3 years ago

Hi,

I installed the dependencies as required and tried to build the extensions via python setup.py build_ext --inplace. But I get the error: im2mesh/utils/libmise/mise.cpp: In function ‘PyObject* __pyx_pf_7im2mesh_5utils_7libmise_4mise_4MISE_6to_dense(__pyx_obj_7im2mesh_5utils_7libmise_4mise_MISE*)’: im2mesh/utils/libmise/mise.cpp:4126:249: error: ‘isnan’ was not declared in this scope */ (( /* dim=0 */ (__pyx_v_out_view.data + __pyx_t_24 * __pyx_v_out_view.strides[0]) ) + __pyx_t_25 * __pyx_v_out_view.strides[1]) ) + __pyx_t_26 * __pyx_v_out_view.strides[2]) )))) != 0);

and many other subsequent errors taht all said "‘isnan’ was not declared in this scope."

Any idea why this is happening?

Thanks a lot!

LeoZDong commented 3 years ago

Seems like I have to manually replace all isnan in mise.cpp with std::isnan. This worked for me.

samagra14 commented 3 years ago

Thanks @LeoZDong . Helped me as well.