jiexiong2016 / GCNv2_SLAM

Real-time SLAM system with deep features
Other
769 stars 194 forks source link

Cannot load the pt file #61

Open antithing opened 2 years ago

antithing commented 2 years ago

Hi, and thanks for making this code available. i am getting an error when trying to load the pt file:

    const char *net_fn = getenv("GCN_PATH");
    net_fn =  (net_fn == nullptr) ? "gcn2.pt" : net_fn;
    module = torch::jit::load(net_fn); //exception here

I have tried hardcoding as here:

    const char *net_fn = getenv("GCN_PATH");
    net_fn = "D:\\testing\\GCNv2_SLAM - master\\build\\Release\\data\\gcn2.pt";// (net_fn == nullptr) ? "gcn2.pt" : net_fn;
    module = torch::jit::load(net_fn);

But I see the same thing..

Unhandled exception at 0x00007FF828024ED9 in ORB_SLAM2.exe: Microsoft C++ exception: c10::Error at memory location

What can i do to solve this? Thanks!