Torch.nn missing

I’ve been trying to compile a programme using the pytorch libraries for Android. However when i compile from the source code, only the JIT module’s methods are compiled.
How to i get the torch::nn Module’s methods ?

Hey, could you provide the log or the error message so that we know where to take a look?
cc: @Linbin @IvanKobzarev

When I compile my programme i point to the folder containing the libraries and include torch, torch_cpu and c10.
But i always get the following errors

ld: error: undefined symbol: torch::cuda::is_available()
ld: error: undefined symbol: torch::nn::Module::named_buffers(bool) const
ld: error: undefined symbol: torch::nn::Module::named_parameters(bool) const
ld: error: undefined symbol: torch::nn::Module::eval()
ld: error: undefined symbol: torch::nn::EmbeddingImpl::forward(at::Tensor const&)
ld: error: undefined symbol: torch::nn::detail::RNNImplBase<torch::nn::LSTMImpl>::flatten_parameters()
ld: error: undefined symbol: torch::nn::LSTMImpl::forward(at::Tensor const&,c10::optional<std::__ndk1::tuple<at::Tensor, at::Tensor> >)
ld: error: undefined symbol: typeinfo for torch::nn::Module

I’ve been told it’s because i’ve only compiled the JIT version of pytorch. But looking thought the build_android.sh file on the git repo, I can’t see any options that would not build the JIT version.

It appears that by turning NO_API=OFF and BUILD_MOBILE_AUTOGRAD=ON in the root CMake file,builds the api.