isl-org / DeepLagrangianFluids

Code repository for "Lagrangian Fluid Simulation with Continuous Convolutions", ICLR 2020.
Other
212 stars 41 forks source link

Got an AttributeError when the code call the "open3d.ml.tf.layers()" #2

Closed alex-wy closed 4 years ago

alex-wy commented 4 years ago

After I run the code in the "Building Open3D with ML module" to install Open3d ML module:

git clone --branch ml-module https://github.com/intel-isl/Open3D.git

mkdir Open3D/build
cd Open3D/build

cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_TENSORFLOW_OPS=ON

I got an CMake Error

CMake Error at /d/WangYue/venv/lib/python3.5/site-packages/cmake/data/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:164 (message):
  Could NOT find nanoflann (missing: nanoflann_INCLUDE_DIR)
Call Stack (most recent call first):
  /d/WangYue/venv/lib/python3.5/site-packages/cmake/data/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:445 (_FPHSA_FAILURE_MESSAGE)
  3rdparty/CMake/Findnanoflann.cmake:15 (find_package_handle_standard_args)
  src/Open3D/ML/TensorFlow/CMakeLists.txt:12 (find_package)

So I run these code to git and configure it.

git clone --recursive https://github.com/intel-isl/Open3D
cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_TENSORFLOW_OPS=ON
make install-pip-package

But I got error message when I want to run the pretrained model:

Traceback (most recent call last):
  File "./run_network.py", line 13, in <module>
    from create_physics_scenes import obj_surface_to_particles, obj_volume_to_particles
  File "./../datasets/create_physics_scenes.py", line 20, in <module>
    import open3d as o3d
  File "/d/WangYue/venv/lib/python3.5/site-packages/open3d/__init__.py", line 46, in <module>
    from open3d.open3d_pybind import camera
ImportError: /d/WangYue/venv/lib/python3.5/site-packages/open3d/open3d_pybind.cpython-35m-x86_64-linux-gnu.so: undefined symbol: XcursorImageLoadCursor

After I change the cmake sentence:

cmake -DBUILD_EIGEN3=ON  \
      -DBUILD_GLEW=ON    \
      -DBUILD_JSONCPP=ON \
      -DBUILD_PNG=ON     \
      -DBUILD_TENSORFLOW_OPS=ON
      ..

However, I got a new error when I run the pretrained model:

Traceback (most recent call last):
  File "./run_network.py", line 152, in <module>
    sys.exit(main())
  File "./run_network.py", line 148, in main
    args.output, args)
  File "./run_network.py", line 40, in run_sim
    model = trainscript_module.create_model()
  File "/e/WangYue/DeepLagrangianFluids/scripts/train_network.py", line 32, in create_model
    model = MyParticleNetwork()
  File "/e/WangYue/DeepLagrangianFluids/scripts/../models/default.py", line 58, in __init__
    activation=None)
  File "/e/WangYue/DeepLagrangianFluids/scripts/../models/default.py", line 36, in Conv
    conv_fn = o3dml.layers.ContinuousConv
AttributeError: module 'open3d.ml.tf' has no attribute 'layers'

Btw, It's okay to "import open3d.ml.tf". How can I fix it?

benjaminum commented 4 years ago

Hi, the --recursive is missing in the instructions. Can you try the following?

git clone --recursive --branch ml-module https://github.com/intel-isl/Open3D.git

This should ensure that you have all the submodules and that you are on the right branch.

alex-wy commented 4 years ago

Hi, the --recursive is missing in the instructions. Can you try the following?

git clone --recursive --branch ml-module https://github.com/intel-isl/Open3D.git

This should ensure that you have all the submodules and that you are on the right branch.

It works! Thx for ur reply!