pytorch导出onnx

net = Net()
dummy_input = torch.randn(1, 3, 224, 224, device='cuda')

torch.onnx.export(net, (dummy_input), "1.onnx", verbose=True, input_names=['input1'], output_names=['output1'],opset_version=11)

你可能感兴趣的:(pytorch,pytorch,深度学习,机器学习)