You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "bravomikekilo (via GitHub)" <gi...@apache.org> on 2023/06/29 19:57:53 UTC

[GitHub] [tvm] bravomikekilo commented on issue #15180: [Bug] [Unity] [Relax] [frontend] Error when using from_onnx

bravomikekilo commented on issue #15180:
URL: https://github.com/apache/tvm/issues/15180#issuecomment-1613733091

   There is a type error in [onnx_frontend.py](https://github.com/mlc-ai/relax/blob/mlc/python/tvm/relax/frontend/onnx/onnx_frontend.py#L2083). `from_onnx`  function actually return an single `IRModule`, instead of a tuple.
   To workaround this bug, maybe you can try
   ```python3
   from tvm.relax.frontend.onnx import from_onnx
   from tvm import relax
   
   onnx_file = "/path/to/sigmoid.onnx"
   model = onnx.load(onnx_file)
   
   ir_mod = from_onnx(model, keep_params_in_input=True)
   ir_mod, params = relax.frontend.detach_params(ir_mod)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org