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

ONNX import issue: Pad: only float values are currently supported for constant value, submit an issue on github in pad_config() #2151

Closed
SimonBrandner opened this issue Aug 11, 2024 · 2 comments

Comments

@SimonBrandner
Copy link

ERROR burn_import::logger: PANIC => panicked at /home/simon/.cargo/git/checkouts/burn-178c6829f420d
Pad: only float values are currently supported for constant value, submit an issue on github

Link to model: https://drive.google.com/drive/folders/1zfzHNeGju1r1-5vishZ--uaQNSorA0SJ

@mepatrick73
Copy link
Contributor

I am under the assumption that this is for the landmarks_68_pfld.onnx model.
I am currently using main rev and using the following code

use burn_import::onnx::ModelGen;

fn main() {
    // Generate Rust code from the ONNX model file
    ModelGen::new()
        .input("src/model/landmarks_68_pfld.onnx")
        .out_dir("model/")
        .run_from_script();
}

When I run cargo build, I get the following error :

  ERROR burn_import::logger: PANIC => panicked at /home/patrick/work/burn/crates/burn-import/src/onnx/op_configuration.rs:1056:9:
  Reshape: shape tensor must be present for Node { node_type: Reshape, name: "reshape1", inputs: [Argument { name: "averagepool2d1_out1", ty: Tensor(TensorType { elem_type: Float32, dim: 4, shape: Some([0, 3, 112, 112]) }), value: None, passed: false }, Argument { name: "concat1_out1", ty: Tensor(TensorType { elem_type: Float32, dim: 1, shape: None }), value: None, passed: false }], outputs: [Argument { name: "reshape1_out1", ty: Tensor(TensorType { elem_type: Float32, dim: 0, shape: None }), value: None, passed: false }], attrs: {} }

  --- stderr
  thread 'main' panicked at /home/patrick/work/burn/crates/burn-import/src/onnx/op_configuration.rs:1056:9:
  Reshape: shape tensor must be present for Node { node_type: Reshape, name: "reshape1", inputs: [Argument { name: "averagepool2d1_out1", ty: Tensor(TensorType { elem_type: Float32, dim: 4, shape: Some([0, 3, 112, 112]) }), value: None, passed: false }, Argument { name: "concat1_out1", ty: Tensor(TensorType { elem_type: Float32, dim: 1, shape: None }), value: None, passed: false }], outputs: [Argument { name: "reshape1_out1", ty: Tensor(TensorType { elem_type: Float32, dim: 0, shape: None }), value: None, passed: false }], attrs: {} }
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Let me know if I'm running the right model, because as per issue #2116 this issue is linked to the landmarks model.

@SimonBrandner
Copy link
Author

You're right, closing in favour of #2115

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

2 participants