qonnx.custom_op.channels_last.base_wrapped_op (module)

class qonnx.custom_op.channels_last.base_wrapped_op.ChannelsLastWrappedOp(onnx_node, onnx_opset_version=11)

Bases: qonnx.custom_op.base.CustomOp

execute_node(context, graph)

Execute this CustomOp instance, given the execution context and ONNX graph.

infer_node_datatype(model)

Set the DataType annotations corresponding to the outputs of this node.

verify_node()

Verifies that all attributes the node needs are there and that particular attributes are set correctly. Also checks if the number of inputs is equal to the expected number.

qonnx.custom_op.channels_last.base_wrapped_op.to_channels_first_args(ndim)

Returns the tuple of parameters to transpose a channels last tensor to a channels first one. :param ndim: Number of dimensions of the tensor to be transposed.

qonnx.custom_op.channels_last.base_wrapped_op.to_channels_last_args(ndim)

Returns the tuple of parameters to transpose a channels first tensor to a channels last one. :param ndim: Number of dimensions of the tensor to be transposed.