You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying this example to use the yolo8 in tch-rs, but I encountered an internal error, that cannot determine the specific cause. I can confirm that all the files exist, and I have also tried running the program in administrator mode, but the error persists. How can I troubleshoot this issue?
fnmain() -> anyhow::Result<()>{let model = CModule::load(r#"./yolov8x.torchscript"#).unwrap();// let image = include_bytes!(r#"C:\Users\anivie\OneDrive\document\desktop\b.jpg"#);//runs oklet image = imagenet::load_image_and_resize(r#"C:\Users\anivie\OneDrive\document\desktop\b.jpg"#,416,416)?;//errorlet output = model.forward_ts(&[image.unsqueeze(0)])?.softmax(-1,None);for(probability, class)in imagenet::top(&output,5).iter(){println!("{:50} {:5.2}%",class,100.0*probability)}Ok(())}
error message:
Error: Internal torch error: can't fopen
Stack backtrace:
0: std::backtrace_rs::backtrace::dbghelp::trace
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\..\..\backtrace\src\backtrace\dbghelp.rs:131
1: std::backtrace_rs::backtrace::trace_unsynchronized
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66
2: std::backtrace::Backtrace::create
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\backtrace.rs:331
3: std::backtrace::Backtrace::capture
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\backtrace.rs:296
4: anyhow::error::impl$1::from<enum2$<tch::error::TchError> >
at D:\SDK\Rust\Cargo\registry\src\index.crates.io-6f17d22bba15001f\anyhow-1.0.81\src\error.rs:565
5: core::result::impl$27::from_residual<tuple$<>,enum2$<tch::error::TchError>,anyhow::Error>
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce\library\core\src\result.rs:1959
6: torch_test_win::main
at .\src\main.rs:19
7: core::ops::function::FnOnce::call_once<enum2$<core::result::Result<tuple$<>,anyhow::Error> > (*)(),tuple$<> >
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce\library\core\src\ops\function.rs:250
8: std::sys_common::backtrace::__rust_begin_short_backtrace<enum2$<core::result::Result<tuple$<>,anyhow::Error> > (*)(),enum2$<core::result::Result<tuple$<>,anyhow::Error> > >
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce\library\std\src\sys_common\backtrace.rs:155
9: std::rt::lang_start::closure$0<enum2$<core::result::Result<tuple$<>,anyhow::Error> > >
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce\library\std\src\rt.rs:166
10: std::rt::lang_start_internal::closure$2
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\rt.rs:148
11: std::panicking::try::do_call
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\panicking.rs:552
12: std::panicking::try
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\panicking.rs:516
13: std::panic::catch_unwind
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\panic.rs:142
14: std::rt::lang_start_internal
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\rt.rs:148
15: std::rt::lang_start<enum2$<core::result::Result<tuple$<>,anyhow::Error> > >
at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce\library\std\src\rt.rs:165
16: main
17: invoke_main
at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
18: __scrt_common_main_seh
at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
19: BaseThreadInitThunk
20: RtlUserThreadStart
The text was updated successfully, but these errors were encountered:
I am trying this example to use the yolo8 in tch-rs, but I encountered an internal error, that cannot determine the specific cause. I can confirm that all the files exist, and I have also tried running the program in administrator mode, but the error persists. How can I troubleshoot this issue?
error message:
The text was updated successfully, but these errors were encountered: