onnxtorch#
ONNX in torch autograd function#
deeponnxcustom.onnxtorch.torchort.ort_backward
(ctx, grad_outputs)
Implements backward function. See autograd functions.
deeponnxcustom.onnxtorch.torchort.ort_forward
(ctx, inputs)
Implements forward function. See autograd functions.
deeponnxcustom.onnxtorch.TorchOrtFactory
(self, onnx_model, weights_to_train, input_names = None, output_names = None, class_name = None, sess_options = None, providers = None, provider_options = None, run_options = None, graph_builder_config = None, device_index = 0)
A class which dynamically another class which implements a custom function (see autograd functions). Use ONNX inside a torch function. Only initializers can be trained, no parameters.
deeponnxcustom.onnxtorch.torchort.TorchOrtFunction
(self, args, kwargs)
Ancestor to all classes created by
TorchOrtFactory
. It implements simple functions to move the ownership of tensors from onnxruntime to pytorch (or the other way around) through DLPack structures. This class requires :epkg:`onnxruntime_training`.
ONNX torch runtime#
deeponnxcustom.onnxtorch.OnnxTorchRuntime
(self, onnx_model)
Executes ONNX graph using torch function. This is a very simple runtime. It goes through every node in the ONNX graph and execute with the corresponding torch functions.