Created
October 17, 2020 17:40
-
-
Save pranjalAI/ea7cbe9b0b35c08c43f4d0b66e4a65f0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
model.eval() | |
dummy_input = torch.randn(1, 3, INPUT_HEIGHT, INPUT_WIDTH, | |
dtype=torch.float32, device=DEVICE) | |
output = model(dummy_input.detach()) | |
input_names = ['data'] | |
output_names = ['output1'] | |
torch.onnx.export(model, dummy_input, | |
ONNX_PATH, verbose=False, | |
input_names=input_names, output_names=output_names) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment