Reputation: 11
I have 2 onnx models. The first model was trained earlier and I do not have access to the pytorch version of the saved model. The shape for the input of the model is in the image: Model 1. This model has only 1 parameter for the shape of the model and no room for batch size. I want the model to ideally have an input like this. This model has the same input of 7 variables but also a parameter for batch size. I have tried using the update model tool from onnx but it does not add an extra dimension for batch size.
Upvotes: 1
Views: 2094
Reputation: 54
As far as I know, adding a batch dimension to an existing ONNX model is not supported by any tool. Actually it's quite hard to achieve for complicated models because it needs to know when/how the batch dimension should be added for every node. The better way to do it is still adding batch before the conversion to ONNX.
Upvotes: 0