Created
September 7, 2021 16:03
-
-
Save J3698/04a01d11338cde5a0dd728886fcccfc1 to your computer and use it in GitHub Desktop.
Export simple test model
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
def export_test(): | |
image = torch.ones((1, 3, 256, 256), requires_grad = False) | |
model = Test() | |
torch.onnx.export(model, image, "exports/test.onnx", | |
export_params = True, | |
opset_version = 11, | |
do_constant_folding = True, | |
input_names = ['input'], | |
output_names = ['output'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment