Hi try to use a pytorch model in a c++ file.
I compile my package with catkin_make. Then I got the error:
CMake Error at data_extraction/CMakeLists.txt:27 (find_package):
  By not providing "FindTorch.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Torch", but
  CMake did not find one.

  Could not find a package configuration file provided by "Torch" with any of
  the following names:

    TorchConfig.cmake
    torch-config.cmake

  Add the installation prefix of "Torch" to CMAKE_PREFIX_PATH or set
  "Torch_DIR" to a directory containing one of the above files.  If "Torch"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Configuring incomplete, errors occurred!
See also "/home/wai043/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/wai043/catkin_ws/build/CMakeFiles/CMakeError.log".
Makefile:1748: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed

I also tried these two commands:
export Torch_DIR=/home/user/.local/lib/python3.6/site-packages/torch/share/cmake/Torch/

export CMAKE_PREFIX_PATH=/home/user/.local/lib/python3.6/site-packages/torch/share/cmake/Torch/

but still get the same error.
Does some knows how to solve this?
Best
Gab