finn.transformation.general (module)

class finn.transformation.general.ConvertDivToMul

Bases: finn.transformation.base.Transformation

Convert divide by constant nodes to multiply by constant nodes.

apply(model)
class finn.transformation.general.ConvertSubToAdd

Bases: finn.transformation.base.Transformation

Convert subtract-a-constant nodes to add-a-constant nodes.

apply(model)
class finn.transformation.general.GiveRandomTensorNames

Bases: finn.transformation.base.Transformation

Give random tensor names to all tensors.

apply(model)
class finn.transformation.general.GiveReadableTensorNames

Bases: finn.transformation.base.Transformation

Give more human-readable names to all internal tensors. You should apply GiveUniqueNodeNames prior to this transform to avoid empty node names, as the readable names are based on the node names.

apply(model)
class finn.transformation.general.GiveUniqueNodeNames(prefix='')

Bases: finn.transformation.base.Transformation

Give unique names to each node in the graph using enumeration, starting with given prefix (if specified in the constructor).

apply(model)
class finn.transformation.general.GiveUniqueParameterTensors

Bases: finn.transformation.base.Transformation

Make every parameter tensor unique. The aim is to avoid affecting other nodes apart from the one the system is currently operating on.

apply(model)
class finn.transformation.general.RemoveStaticGraphInputs

Bases: finn.transformation.base.Transformation

Remove any top-level graph inputs that have initializers.

apply(model)
class finn.transformation.general.RemoveUnusedTensors

Bases: finn.transformation.base.Transformation

Remove any unused tensors in the graph by removing any initializers, ValueInfo and tensor annotations associated with it. Unused tensors do not appear as any input/output for any graph nodes.

apply(model)
class finn.transformation.general.SortGraph

Bases: finn.transformation.base.Transformation

Returns the model with its node list sorted topologically. Any ONNX graph to be executed must have a topologically sorted node list, as dictated by the ONNX standard.

apply(model)