libtorch-yolov3
libtorch-yolov3 copied to clipboard
load_weights error
./yolo-app ../imgs/person.jpg
loading weight ...
terminate called after throwing an instance of 'c10::Error'
what(): Tensor: invalid storage offset -5 (setStrided at /pytorch/aten/src/ATen/native/Resize.h:87)
frame #0: std::function<std::string ()>::operator()() const + 0x11 (0x7f0957255441 in /home/chenxin/Desktop/libtorch-shared-with-deps-latest/libtorch/lib/libc10.so)
frame #1: c10::Error::Error(c10::SourceLocation, std::string const&) + 0x2a (0x7f0957254d7a in /home/chenxin/Desktop/libtorch-shared-with-deps-latest/libtorch/lib/libc10.so)
frame #2:
Aborted (core dumped)
https://github.com/walktree/libtorch-yolov3/issues/12 https://github.com/walktree/libtorch-yolov3/issues/4
I guess your weight file was in the wrong directory
put the weight file at models/ solve the problem.