Hi,
My old code which worked perfectly:
std::shared_ptr<torch::jit::script::Module> module = torch::jit::load(s_model_name);
Fails with libtorch 1.2. If you upgrade you have to change the code to:
torch::jit::script::Module module = torch::jit::load(s_model_name, torch::kCUDA);
You also have to change this:
torch::Tensor out_tensor = module->forward({input_tensor}).toTensor();
To this:
torch::Tensor out_tensor = module.forward({input_tensor}).toTensor();
It seems at FB QA exists only for PyTorch but not libtorch.