// torch::jit::script::Module module;
// module = torch::jit::load("/media/ljt/0A9AD66165F33762/LOGPATH/20201206_065944_lr_4e-04_b_8/model2021.pt");
// module.eval();
// //torch::Tensor tensor2 = torch::rand({1, 3, 288, 800});
// std::vector<torch::jit::IValue> inputs;
// inputs.emplace_back(torch::rand({1, 3, 288, 800}));
// torch::Tensor out_tensor = module.forward(inputs).toTensor();
// std::cout << out_tensor.slice(/dim=/1, /start=/0, /end=/200) << '\n';
网友评论