IIRC torch::jit::load now returns a Module rather than a shared_ptr in C++ frontend, starting from PyTorch 1.2 release,
script::Module  is now a reference type, please see the release notes here https://github.com/pytorch/pytorch/releases 17