
Contents
More
Defines a variable, a result…
inputs – list of inputs
op – apply on operator on the inputs
inline – True to reduce the use of function and inlinesmall functions, this only applies ifop is a function
n_var_outputs – number of the operator outputs
input_indices – to select a specific output from the inputoperator
kwargs – operator attributes
Private attribute:
onnx_input_type – names given to the variables
Returns a type if known for the Var itself.
Flattens a matrix (seenumpy.ndarray.flatten()).
axis – only flatten from axis to the end.
If an operator or a function returns more than one output,this takes only one.
index – index of the output to select
Var
Tells if this variable encapsulate a function.
Seenumpy.max().
Seenumpy.mean().
Seenumpy.min().
Seenumpy.prod().
Seenumpy.sum() or any other reduce function.
Replaces inputs by new ones. It creates a copy.It is needed when inlining functions.
Returns itself or the variable corresponding to itsstate after a call to__setitem__.
Forces this variable to get this name during
prefix – prefix
Seenumpy.sum().
Converts the recursive graph to ONNX.
target_opsets – dictionary{opset: version}
as_function – conversion toonnx.FunctionProtooronnx.ModelProto
name – function name ifas_function is True
domain – function domain ifas_function is True
attributes – function attributes if any
constraints – specifies a precise type for the typeconstraints when a function allows more than one type,this works if there is only one variable to be converted
ModelProto, FunctionProto
Holds several instances ofVar.
Converts the recursive graph to ONNX.
target_opsets – dictionary{opset: version}, if None,it is replaced byDEFAULT_OPSETS
as_function – conversion toonnx.FunctionProtooronnx.ModelProto
name – function name ifas_function is True
domain – function domain ifas_function is True
attributes – function attributes if any
constraints – specifies a precise type for the typeconstraints when a function allows more than one type,this works if there is only one variable to be converted
ModelProto, FunctionProto
Defines a named parameter.
name – parameter name
dtype – parameter type (bool, int, str, float)
value – value of the parameter if known
parent_op – node type it belongs to
Returns the corresponding onnx type.