maudzung / Complex-YOLOv4-Pytorch

The PyTorch Implementation based on YOLOv4 of the paper: "Complex-YOLO: Real-time 3D Object Detection on Point Clouds"
https://arxiv.org/pdf/1803.06199.pdf
GNU General Public License v3.0
1.24k stars 256 forks source link

Fix: Load a model for eval and test #39

Open SinDongHwan opened 2 years ago

SinDongHwan commented 2 years ago

Issue : When load a model for evaluating and testing by default, not get a device information from args.gpu_idx, but read it from the pre-train model(.pth). In a yolov4 case, the device inforamtion is written "cuda:2". So, if have one graphic card, cause error.

Fix : When call torch.load(), I used a parameter(map_location). map_location : a function, torch.device, string or a dict specifying how to remap storage locations.

maudzung commented 2 years ago

This is similar to the PR #18 Can you please resolve the conflict?