ONNXConverter

class webdnn.frontend.onnx.ONNXConverter[source]

Converter for Open Neural Network Exchange (ONNX).

To use this converter, you need to install ONNX python module. see ONNX github repository.

convert(model)[source]

Convert ONNX computational graph into WebDNN IR.

Parameters:model – Proto data of ONNX model

example

Convert model stored as ONNX format in “model.proto”.

import onnx
from webdnn.frontend.onnx import ONNXConverter

# import model in onnx
model = onnx.load("model.proto")

# convert
graph = ONNXConverter().convert(model)
Returns:WebDNN Graph
Return type:(Graph)