qonnx.transformation.change_3d_tensors_to_4d (module)

class qonnx.transformation.change_3d_tensors_to_4d.Change3DTo4DTensors

Bases: qonnx.transformation.base.Transformation

Replaces 3D tensors with 4D tensors assuming the following format: [N, C, H] -> [N, C, H, 1]. The attributes of a (specific) set of supported nodes are changed accordingly. If the graph contains unsupported nodes, a warning is raised and the transformation is not applied.

apply(model)