Skip to content

Instantly share code, notes, and snippets.

@ibaiGorordo
Last active November 20, 2021 15:52
Show Gist options
  • Save ibaiGorordo/754de1f6c1b44f819e87b33cf8509699 to your computer and use it in GitHub Desktop.
Save ibaiGorordo/754de1f6c1b44f819e87b33cf8509699 to your computer and use it in GitHub Desktop.
images = np.zeros((1, 3, 360, 640), dtype=np.float32)
masks = np.ones((1, 1, 360, 640), dtype=np.float32)
torch.onnx.export(nnet.model,
(images, masks),
"model_float32.onnx",
export_params=True,
opset_version=11,
do_constant_folding=True,
input_names = ['input_rgb','input_mask'],
output_names = ['pred_logits', 'pred_curves','foo_out_1', 'foo_out_2','weights'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment