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

Neither shape not scale makes sense #1243

Open
oaifaye opened this issue Oct 25, 2023 · 0 comments
Open

Neither shape not scale makes sense #1243

oaifaye opened this issue Oct 25, 2023 · 0 comments

Comments

@oaifaye
Copy link

oaifaye commented Oct 25, 2023

When I have a Constant in my onnx file, I may not get the value of Constant after loading the model. For example, in the following code, Resize_3 is input by scale, which is just a Constant, but it seems that the constant cannot be obtained.
图片

The error stack looks like this
thread 'main' panicked at 'called Result::unwrap() on an Err value: Evaluating #511 "Resize_3" Resize

Caused by:
Neither shape not scale makes sense: input_shape: [1, 24, 4, 4], scale: None, sizes: None', src\main.rs:6:17
stack backtrace:
0: 0x7ff7c49afe9c - std::sys_common::backtrace::_print::impl$0::fmt
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library\std\src\sys_common\backtrace.rs:44
1: 0x7ff7c49c889b - core::fmt::rt::Argument::fmt
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library\core\src\fmt\rt.rs:138
2: 0x7ff7c49c889b - core::fmt::write
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library\core\src\fmt\mod.rs:1094
3: 0x7ff7c49ac599 - std::io::Write::write_fmtstd::sys::windows::stdio::Stderr
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library\std\src\io\mod.rs:1713
4: 0x7ff7c49afc4b - std::sys_common::backtrace::_print
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library\std\src\sys_common\backtrace.rs:47
5: 0x7ff7c49afc4b - std::sys_common::backtrace::print
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library\std\src\sys_common\backtrace.rs:34
6: 0x7ff7c49b2459 - std::panicking::default_hook::closure$1
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library\std\src\panicking.rs:269
7: 0x7ff7c49b210f - std::panicking::default_hook
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library\std\src\panicking.rs:288
8: 0x7ff7c49b295e - std::panicking::rust_panic_with_hook
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library\std\src\panicking.rs:705
9: 0x7ff7c49b284d - std::panicking::begin_panic_handler::closure$0
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library\std\src\panicking.rs:597
10: 0x7ff7c49b0819 - std::sys_common::backtrace::__rust_end_short_backtracestd::panicking::begin_panic_handler::closure_env$0,never$
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library\std\src\sys_common\backtrace.rs:151
11: 0x7ff7c49b2550 - std::panicking::begin_panic_handler
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library\std\src\panicking.rs:593
12: 0x7ff7c49e1a05 - core::panicking::panic_fmt
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library\core\src\panicking.rs:67
13: 0x7ff7c49e2013 - core::result::unwrap_failed
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library\core\src\result.rs:1651
14: 0x7ff7c45f4070 - enum2$<core::result::Result<tuple$<>,anyhow::Error> >::unwrap<tuple$<>,anyhow::Error>
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26\library\core\src\result.rs:1076
15: 0x7ff7c26e0e58 - onnx_demo::main
at F:\rustCode\onnx-demo\src\main.rs:6
16: 0x7ff7c26d54ab - core::ops::function::FnOnce::call_once<void ()(),tuple$<> >
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26\library\core\src\ops\function.rs:250
17: 0x7ff7c26d500e - std::sys_common::backtrace::__rust_begin_short_backtrace<void (
)(),tuple$<> >
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26\library\std\src\sys_common\backtrace.rs:135
18: 0x7ff7c26d500e - std::sys_common::backtrace::__rust_begin_short_backtrace<void (*)(),tuple$<> >
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26\library\std\src\sys_common\backtrace.rs:135
19: 0x7ff7c26d4481 - std::rt::lang_start::closure$0<tuple$<> >
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26\library\std\src\rt.rs:166
20: 0x7ff7c49a7ad8 - std::rt::lang_start_internal::closure$2
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library\std\src\rt.rs:148
21: 0x7ff7c49a7ad8 - std::panicking::try::do_call
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library\std\src\panicking.rs:500
22: 0x7ff7c49a7ad8 - std::panicking::try
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library\std\src\panicking.rs:464
23: 0x7ff7c49a7ad8 - std::panic::catch_unwind
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library\std\src\panic.rs:142
24: 0x7ff7c49a7ad8 - std::rt::lang_start_internal
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library\std\src\rt.rs:148
25: 0x7ff7c26d445a - std::rt::lang_start<tuple$<> >
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26\library\std\src\rt.rs:165
26: 0x7ff7c26e1e99 - main
27: 0x7ff7c49dfa80 - invoke_main
at D:\a_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
28: 0x7ff7c49dfa80 - __scrt_common_main_seh
at D:\a_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
29: 0x7ffda2c67974 - BaseThreadInitThunk
30: 0x7ffda3cea2f1 - RtlUserThreadStart

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

1 participant