OptimizeRule

class webdnn.graph.optimize_rule.OptimizeRule[source]

OptimizeRule transforms IR graph. This class used not only for just optimization, but also analysis, fallback supports, and so on.

flags()[source]

optimize(graph)

Return list of boolean values. If False is contained more than zero, this optimize rule is not applied. :returns: boolean values :rtype: (tuple of bool)

optimize(graph)[source]

Optimize the given graph.

Parameters:graph (Graph) – Computational graph
Returns:Optimized graph and flag whether the graph is changed or not.
Return type:(tuple of Graph and bool)