代码参考
这个代码实现将原始onnx模型的所有输入的第一个维度修改为sym_batch_dim=1
import onnx
def change_input_dim(model):
# Use some symbolic name not used for any other dimension
sym_batch_dim = "1"
# or an actal value
actual_batch_dim = 4
# The following code changes the first dimension of every input to be batch-dim
# Modify as appropriate ... note that this r

最低0.47元/天 解锁文章
447

被折叠的 条评论
为什么被折叠?



