Skip to content

Instantly share code, notes, and snippets.

@franperezlopez
Created April 12, 2019 23:38
Show Gist options
  • Save franperezlopez/ca53809ed433248bf6af2e7db3428147 to your computer and use it in GitHub Desktop.
Save franperezlopez/ca53809ed433248bf6af2e7db3428147 to your computer and use it in GitHub Desktop.
def to_onnx(file_path:str, data: DataBunch, model:TabularExperimentModel):
dummy_input = next(iter(data.train_dl))[0]
torch.onnx.export(model, (dummy_input[0],dummy_input[1]), file_path)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment