I’m porting my model from ubuntu to Windows, but I cannot load the model using C++ in Windows.
The loading is fine using python in both OS, and C++ loading works fine in ubuntu.
But when I try to load the same model file using C++ in Windows, it gives me c10::Error unknown error.
Here is the model file and the CMakeList I’m using. (I’m using Visual Studio 15 2017 Win64 as CMAKE_GENERATOR)
https://drive.google.com/open?id=1xQlx2VFKg1fyFAP0HDcVKU-yLmW5tm3x
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
project(IKAI)
find_package(Torch REQUIRED)
add_library(IKAI SHARED IKAI.cpp IKAI.h)
target_link_libraries(IKAI "${TORCH_LIBRARIES}")
set_property(TARGET IKAI PROPERTY CXX_STANDARD 11)
add_executable(test_IKAI IKAI.cpp)
target_link_libraries(test_IKAI "${TORCH_LIBRARIES}")
set_property(TARGET test_IKAI PROPERTY CXX_STANDARD 11)
set(CMAKE_EXPORT_COMPILE_COMMANDS "ON")
I have tried different pytorch version and cuda version, but no progress.
Does anyone has the same problem?