MCPcopy Create free account
hub / github.com/AllentDan/LibtorchTutorials / LoadWeight

Method LoadWeight

lesson7-Detection/src/Detector.cpp:235–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

233}
234
235void Detector::LoadWeight(std::string weight_path) {
236 try
237 {
238 torch::load(detector, weight_path);
239 }
240 catch (const std::exception& e)
241 {
242 std::cout << e.what();
243 }
244 detector->to(device);
245 detector->eval();
246 return;
247}
248
249void show_bbox(cv::Mat image, torch::Tensor bboxes, std::vector<std::string> name_list) {
250 //���û����ı�����ز���

Callers 1

mainFunction · 0.45

Calls 1

whatMethod · 0.80

Tested by

no test coverage detected