Multi Dimension Input
Question
Hi, I have tensorflow model pb file which is multidimensional input, how can I pass that as command line argument?
Further information
Input node name: TensorInput: 0 Input shape is [?, 1024, 1024, 3] , [?1024, 1024, 3]
I'm passing this as an argument:
python -m tf2onnx.convert --saved-model test_model.pb --inputs TensorInput:0[[-1,1024,1024,3],[-1,1024,1024,3] --output model.onnx --outputs decoder:0
-1 because in readme it is written to us -1 for unknown dimension
@fatcat-z please help
-1 is designed for unknown (dynamic) dimensions. Not sure if this is what you need.
Yes, I got that part that we have to use -1 for unknown dimension. I want to know how to specify in the command line for a multidimensional array which is like this: [-1, 1024, 1024, 3] , [-1,1024, 1024, 3].
I tried this: python -m tf2onnx.convert --saved-model test_model.pb --inputs TensorInput:0[[-1,1024,1024,3],[-1,1024,1024,3] --output model.onnx --outputs decoder:0
But it failed. @fatcat-z
What kind of errors you met? From my perspective, seems like there is 1 more unexpected '[' in your command. Could you please try the command below and share us the error you met?
python -m tf2onnx.convert --saved-model test_model.pb --inputs TensorInput:0[-1,1024,1024,3] --output model.onnx --outputs decoder:0
There is an example here which might help you a little.