Skip to content

bug(onnx): model created using tf2onnx panics with non-valid Ident #2878

Open
@martinjrobins

Description

@martinjrobins

Describe the bug
I have a equinox jax model I want to import into burn. I used jax2tf to get a tensorflow model, then tf2onnx to obtain the onnx file. When I try to import this into burn it panics with the message:

ERROR burn_import::logger: PANIC => panicked at /home/mrobins/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/burn-import-0.16.0/src/burn/ty.rs:123:19:
  "jax2tf_rhs_/pjit_silu_/Const_2:0" is not a valid Ident   

I'd imagine it is the ":" or "/" characters in the ident, which seem to be used to identify blocks and outputs in the model. Is this panic expected or a bug?

To Reproduce

You can get the onnx file here: https://github.com/martinjrobins/diffsol/raw/refs/heads/workspace/examples/neural-ode-weather-prediction/rhs.onnx

Then I read it in as per the onnx example: https://burn.dev/burn-book/import/onnx-model.html

Expected behavior

The model to import without panic

Desktop (please complete the following information):

  • OS: Ubuntu
  • Browser chrome
  • Version 22.04

Additional context
Using burn v0.16.0

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingonnx

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions