tracel-ai / burn

Burn is a new comprehensive dynamic Deep Learning Framework built using Rust with extreme flexibility, compute efficiency and portability as its primary goals.

Home Page:https://burn.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ONNX import issue: `index out of bounds`

SimonBrandner opened this issue · comments

Trying to import this model results in the following error:

ERROR burn_import::logger: PANIC => panicked at /home/simon/.cargo/git/checkouts/burn-178c6829f420dae1/53c77ae/crates/onnx-ir/src/dim_inference.rs:331:
41:
  index out of bounds: the len is 3 but the index is 3    

  --- stderr
  thread 'main' panicked at /home/simon/.cargo/git/checkouts/burn-178c6829f420dae1/53c77ae/crates/onnx-ir/src/dim_inference.rs:331:41:
  index out of bounds: the len is 3 but the index is 3
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Link to model: https://drive.google.com/file/d/1YDQycQf6RLy4RElEqGSgezvd4WjULebi/view?usp=drive_link

No longer valid

@SimonBrandner BTW, the onnx file should now work but the file has to go through a couple of transformation:

  1. Run through onnxsim to simplify gather + reshape nodes
  2. Rename numeric nodes (we still haven't fixed this on our end) using this python script: https://github.com/antimora/face-onnx/blob/main/rename_node_input_output.py

I really ought to figure out how to run onnxsim on NixOS...

I really ought to figure out how to run onnxsim on NixOS...

Nix seems more trouble than a help😅

I gave up on nix.

Haha, I feel like for me the pros outweigh the cons but it took quite some time and I am still very far away from being good at Nix itself and run into a wall at times (like this for example) 😅