qonnx.transformation.fold_constants (module)
- class qonnx.transformation.fold_constants.FoldConstants(exclude_op_types=['Quant', 'BipolarQuant'])
Bases:
qonnx.transformation.base.TransformationReplace the output of a node with const-only inputs with a precomputed result. Skip any op types given in exclude_op_types.
- apply(model)
- class qonnx.transformation.fold_constants.FoldConstantsFiltered(match_filter_fxn)
Bases:
qonnx.transformation.base.TransformationReplace the output of a node with const-only inputs with a precomputed result. Use the match_filter_fxn(model, node) function to decide which nodes can be eligible for const folding.
- apply(model)