donut导出onnx模型

donut模型简介
代码
onnx导出
shell 复制代码
# pip install optimum-cli
# 导出为encoder.onnx 和 decoder.onnx
optimum-cli export onnx  -m finetune-model-path --task vision2seq-lm onnx-ouput-path 

#  导出为model.onnx模型
optimum-cli export onnx  -m finetune-model-path --task vision2seq-lm onnx-ouput-path --monolith
模型结构查看
netron

模型太大无法上传,放弃

onnx查看网络结构
python 复制代码
#https://zhuanlan.zhihu.com/p/516920606
import onnx 
model = onnx.load('model.onnx') 
# 模型图结构
graph = model.graph 
# 模型节点
node = graph.node 
# 模型输入
input = graph.input 
# 模型输出
output = graph.output 
print(node) 
print(input) 
print(output) 
相关推荐
sanggou1 小时前
【Python爬虫】手把手教你从零开始写爬虫,小白也能轻松学会!(附完整源码)
开发语言·爬虫·python
KG_LLM图谱增强大模型2 小时前
Vgent:基于图的多模态检索推理增强生成框架GraphRAG,突破长视频理解瓶颈
大数据·人工智能·算法·大模型·知识图谱·多模态
AKAMAI2 小时前
企业如何平衡AI创新与风险
人工智能·云原生·云计算
geng_zhaoying2 小时前
在VPython中使用向量计算3D物体移动
python·3d·vpython
半tour费2 小时前
TextCNN-NPU移植与性能优化实战
python·深度学习·分类·cnn·华为云
普通网友2 小时前
使用Flask快速搭建轻量级Web应用
jvm·数据库·python
百锦再2 小时前
第17章 模式与匹配
开发语言·后端·python·rust·django·内存·抽象
普通网友3 小时前
Python函数定义与调用:编写可重用代码的基石
jvm·数据库·python
TDengine (老段)3 小时前
优化 TDengine IDMP 面板编辑的几种方法
人工智能·物联网·ai·时序数据库·tdengine·涛思数据
普通网友3 小时前
使用Python进行PDF文件的处理与操作
jvm·数据库·python