Hey, I am really impressed with the intuitiveness of Pytorch’s both Python and C++ apis and want to use it at work where we mainly do C++ development, but I am struggling to get the GAN demo going because of a weird issue.

.Setup : FastAI Paperspace Ubuntu instance with all the latest version of pytorch.
When I open up the Python interperter and run torch.cuda.is_available() -> TRUE
When I do the same thing from a C++ (exactly following this tutorial https://github.com/pytorch/examples/tree/master/cpp/dcgan 7) I get FALSE for toch::cuda::is_available() :?

my CMakeLists.txt looks like this :
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
project(train-gan)

find_package(Torch REQUIRED)
find_package(CUDA 10.1 REQUIRED)

add_executable(train-gan train_gan.cpp dis.cpp gen.cpp)

target_link_libraries(train-gan "${TORCH_LIBRARIES}")
target_link_libraries(train-gan "${CUDA_LIBRARIES}")

set_property(TARGET train-gan PROPERTY CXX_STANDARD 11)

the full project you can find on my github -> https://github.com/skalaydzhiyski/cpp-gan 8
I am new to cmake (as probably visible from the repo) and just want to get torch to use GPU in C++.
Let me know if you need any more information and thanks in advance.