Closed Harr7y closed 2 years ago
@Harr7y for pth models if you load it in python (generally you need model definition for pth models) then torch supports the onnx conversion implicitly
which is something like this
torch.onnx.export(model, dummy_input, "alexnet.onnx", verbose=True, input_names=input_names, output_names=output_names)
after converting to onnx you can easily convert it to ztn following the zetane documentation
@Harr7y for pth models if you load it in python (generally you need model definition for pth models) then torch supports the onnx conversion implicitly
which is something like this
torch.onnx.export(model, dummy_input, "alexnet.onnx", verbose=True, input_names=input_names, output_names=output_names)
after converting to onnx you can easily convert it to ztn following the zetane documentation
Thanks a lot for your reply.
A usual saved format for Pytorch is '.pth', how could we generate the own ZTN or ONNX format self-designed models with Pytorch.