Module Reference

Export

ONNX-Chainer exports Chainer model to ONNX graph with various options.

onnx_chainer.export Export function for chainer.Chain in ONNX format.
onnx_chainer.export_testcase Export model and I/O tensors of the model in protobuf format.

Export Utilities

ONNX-Chainer provides some utility functions to help exporting.

onnx_chainer.replace_func.fake_as_funcnode The target function fakes FunctionNode
onnx_chainer.replace_func.as_funcnode The target function fakes FunctionNode

Convert Utilities

These utilities helps converting from Chainer model to ONNX format, mainly used them internally.

onnx_chainer.context.Context Context of converter
onnx_chainer.onnx_helper.GraphBuilder A helper class to build consecutive ONNX nodes.
onnx_chainer.onnx_helper.set_func_name Set the name of Chainer function being converted.
onnx_chainer.onnx_helper.get_func_name Return processing function name
onnx_chainer.onnx_helper.make_node A thin wrapper of onnx.helper.make_node.
onnx_chainer.onnx_helper.write_tensor_pb
onnx_chainer.onnx_helper.cleanse_param_name Converts Chainer parameter names to ONNX names.

Testing Utilities

onnx_chainer.testing.input_generator.increasing Returns a monotonically increasing ndarray for test inputs.
onnx_chainer.testing.input_generator.nonzero_increasing Returns a monotonically increasing ndarray for test inputs.
onnx_chainer.testing.input_generator.positive_increasing Returns a monotonically increasing ndarray for test inputs.