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
ERROR burn_import::logger: PANIC => panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/burn-import-0.15.0/src/burn/ty.rs:200:9:
assertion left != right failed: name: gather1_out1; shape:None; kind:Int --???: Trying to create TensorType with dim = 0 - should be a Scalar instead!
The pannic is happening when try to convert the Onnx Argument type to burn Type.
Support for scalar tensors in ONNX import has been added progressively but the importer is not complete. The effort is mostly community-driven at this stage since we don't have enough bandwidth internally.
Thanks for super fast response, I'd like to help, but probably need to take some time to look into this issue cuz I just start to use burn(thx for this nice crate it's awesome).
If possible would you mind sharing your thoughts about the direction of potential solutions?
If the issue really is with the output of your gather node that is a scalar, we need to expand the GatherNode implementation to support scalar outputs.
The codegen in forward(...) only works for a tensor output.
That also means that the conversion should accept scalar or tensor types (which is probably the current point of failure given the panic message).
Describe the bug
When converting an onnx model got panic as shown in the title.
Adds some debugging logs:
DEBUG burn_import::onnx::to_burn: Node outputs first : Some(Argument { name: "gather1_out1", ty: Tensor(TensorType { elem_type: Int64, dim: 0, shape: None }), value: None, passed: false })
ERROR burn_import::logger: PANIC => panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/burn-import-0.15.0/src/burn/ty.rs:200:9:
assertion
left != right
failed: name: gather1_out1; shape:None; kind:Int --???: Trying to create TensorType with dim = 0 - should be a Scalar instead!The pannic is happening when try to convert the Onnx Argument type to burn Type.
Here is the onnx op info:
Some(Argument { name: "gather1_out1", ty: Tensor(TensorType { elem_type: Int64, dim: 0, shape: None }), value: None, passed: false })
To Reproduce
Expected behavior
Screenshots
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: