neilmehta87:

am new to libtorch and I was completing the featured example to learn Pytoch C++ frontend.
I downloaded the cmake and dcgan.cpp files from git and was able to cmake it on a cluster using the clang-llvm/11 compilers. I am using libtorch files downloaded from https://download.pytorch.org/libtorch/nightly/cu100/libtorch-cxx11-abi-shared-with-deps-latest.zip
I am using cuda 10.2.89 and pytorch v1.5.0-gpu.
When I try running the executable, I get the following error
./dcgan: symbol lookup error: ./dcgan: undefined symbol:  _ZN5torch5optim6detail13OptimizerBase15add_param_groupERKNS0_19OptimizerParamGroupE  
It appears that the following lines are responsible for this error:
   torch::optim::Adam  generator_optimizer(generator->parameters(),  torch::optim::AdamOptions(2e-4).betas(std::make_tuple (0.5, 0.5)));  torch::optim::Adam  discriminator_optimizer(discriminator->parameters(),  torch::optim::AdamOptions(2e-4).betas(std::make_tuple (0.5, 0.5)));
Is there anyone who has previously encountered this error? May I please request your help regarding the same?
Thank you


Update: I was able to get the example working using libtorchv1.5.0 .