peal.architectures.onnx_predictor.load_onnx_runtime¶
- peal.architectures.onnx_predictor.load_onnx_runtime(path, device='cuda')[source]¶
The pre-conversion behaviour: an onnxruntime closure (not trainable).
- Parameters:
path (
str) – Path of the.onnxfile.device (
strortorch.device) – Device the output tensor is moved to.
- Returns:
onnx_model(input_data)that feeds the tensor to onnxruntime as float32 and returns the first output as a tensor ondevice. The closure carries the attributeonnx_path.- Return type:
callable