Code Monkey home page Code Monkey logo

Comments (3)

LUXUS1 avatar LUXUS1 commented on June 2, 2024 1

可以使用optimum-cli进行转换
1、pip install optimum[exporters]
2、其他环境版本:pytorch=2.0.0 onnx=1.14.1
3、转换命令:optimum-cli export onnx --model weights/weights/ --task image-to-text --opset 18 onnx_test/
其中--model weights/weights/ 为模型路径,--opset 18可选,onnx_test/为保存路径

from trocr-chinese.

LaplaTom avatar LaplaTom commented on June 2, 2024

您好,我执行第一个作者的命令可以转换成功,但是在测试的时候会提示 onnxruntime.capi.onnxruntime_pybind11_state.InvalidArgument: [ONNXRuntimeError] : 2 : INVALID_ARGUMENT : Invalid Feed Input Name:attention_mask

采用optimum-cli转换的话,是这个问题 UnboundLocalError: local variable 'all_files' referenced before assignment

from trocr-chinese.

LUXUS1 avatar LUXUS1 commented on June 2, 2024

这个问题我没遇到过,哈哈。你可以更换一下torch或者opset的版本试一下。

from trocr-chinese.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.