Skip to content

Instantly share code, notes, and snippets.

@rpitonak
Last active July 12, 2022 07:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rpitonak/801422939d385e2347baca7d435dd3be to your computer and use it in GitHub Desktop.
Save rpitonak/801422939d385e2347baca7d435dd3be to your computer and use it in GitHub Desktop.
model_input_name = "X"
X = onnx.helper.make_tensor_value_info(
model_input_name,
onnx.TensorProto.FLOAT,
[None, None, None, 3]) # notice that we are leaving just channels dimension fixed, Batch size, width and heigh is not known in advance
model_output_name = "Y"
Y = onnx.helper.make_tensor_value_info(
model_output_name,
onnx.TensorProto.FLOAT,
[None, 3, 224, 224]) # output is resized but also transposed to be ready as an input to Squeezenet model
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment