Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

load_weights error #20

Open
mathpopo opened this issue Jul 17, 2019 · 2 comments
Open

load_weights error #20

mathpopo opened this issue Jul 17, 2019 · 2 comments

Comments

@mathpopo
Copy link

./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: + 0xa36497 (0x7f094d20b497 in /home/chenxin/Desktop/libtorch-shared-with-deps-latest/libtorch/lib/libcaffe2.so)
frame #3: at::native::as_strided_tensorimpl(at::Tensor const&, c10::ArrayRef, c10::ArrayRef, c10::optional) + 0xbb (0x7f094d2081eb in /home/chenxin/Desktop/libtorch-shared-with-deps-latest/libtorch/lib/libcaffe2.so)
frame #4: + 0xb25b1a (0x7f094d2fab1a in /home/chenxin/Desktop/libtorch-shared-with-deps-latest/libtorch/lib/libcaffe2.so)
frame #5: at::native::slice(at::Tensor const&, long, long, long, long) + 0x1b8 (0x7f094d2000f8 in /home/chenxin/Desktop/libtorch-shared-with-deps-latest/libtorch/lib/libcaffe2.so)
frame #6: at::TypeDefault::slice(at::Tensor const&, long, long, long, long) const + 0x1a (0x7f094d45f1fa in /home/chenxin/Desktop/libtorch-shared-with-deps-latest/libtorch/lib/libcaffe2.so)
frame #7: at::Tensor::slice(long, long, long, long) const + 0x6f (0x55b9b4eb4cf5 in ./yolo-app)
frame #8: Darknet::load_weights(char const*) + 0x596 (0x55b9b4eadfee in ./yolo-app)
frame #9: main + 0x1a1 (0x55b9b4eef14b in ./yolo-app)
frame #10: __libc_start_main + 0xe7 (0x7f08d0fe5b97 in /lib/x86_64-linux-gnu/libc.so.6)
frame #11: _start + 0x2a (0x55b9b4ea848a in ./yolo-app)

Aborted (core dumped)

@walktree
Copy link
Owner

walktree commented Jul 17, 2019

#12 #4

@reveriel
Copy link
Contributor

I guess your weight file was in the wrong directory

put the weight file at models/ solve the problem.

reveriel added a commit to reveriel/libtorch-yolov3 that referenced this issue Nov 13, 2019
walktree added a commit that referenced this issue Oct 13, 2020
print error message and exit if file not found. #20 #27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants