[deploee] terminology #1564
tpoisonooo
started this conversation in
General
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
关于 input shape
模型的输入 shape 有两种:
事实上,每个推理框架对 shape 的要求是不同的:
..
模型转换为啥要填动态 shape ?
可以看到,每个框架要求不一样,但实现硬件模型库,不能写大量的 if-else,否则难以维护。
所以无论 UI 输入的是什么,在后端系统内部,都会调整成这种结构:
UI 允许何种输入?
20230329 之前
填 shape 本身,是很费事的, 用户不输入 shape 的时候, 系统来做模糊查询, 匹配已有的结果。
也就是从这个目录里模糊匹配,所以用户不输入、大概率也能转出来
当然了,我们允许用户输入 shape。为了填写方便(少按 shift 少写
"
),我们采用 toml 语法:并非所有 runtime 都需要 shape 范围,例如用 ncnn 做推理框架,就不用填。
20230329 之后
用户输入的格式仍然是 toml,我们应该尽量避免用户自己填
之前是从已有目录里模糊匹配。效果一般,例如 yolox 经常匹配出 [1,3,300,300],实际上用 640x640 才对
所以新版本增加了 shape 推导:
同时增强输入体验,少敲键盘:
[1,3,224,224]
或者input = [1,2,224,224]
, 会内部补全成关于 SDK
模型转换生成 SDK 包啥意思 ?
mmdeploy 预制了各算法的 C++ 前后处理。模型转换后会出现对应配置文件,整个
work_dir
模型包可以在硬件上跑完整的功能,而非推理本身。Beta Was this translation helpful? Give feedback.
All reactions