1. Export a torch model into ONNX

Export a torch model into ONNX

import torch
from import save_as_onnx

class MyModel(torch.nn.Module):
    # ...

nn = MyModel()
save_as_onnx(nn, "my_model.onnx")

(original entry : of, line 13)

Ligne de commande#

Commande check#


Checks the module works as expected.


python -m deeponnxcustom check --help


usage: check [-h] [-v VERBOSE]

Runs a couple of functions to check the module is working.

optional arguments:
  -h, --help            show this help message and exit
  -v VERBOSE, --verbose VERBOSE
                        0 to hide the standout output (default: 1)