d1e6e624ef891543c5bba32bb0a696d350714693,coremltools/converters/nnssa/coreml/ssa_converter.py,SSAConverter,_convert_reduction,#SSAConverter#Any#,1424

Before Change


        op = node.op.lower()  // type of the unary operator
        if op in ["all", "any"]:
            op = "prod" if op == "all" else "sum"
            graph = self._get_current_graph()
            reduction_indices = [graph[node.inputs[1]].value.val]
        func = getattr(self._get_builder(), "add_reduce_" + op)
        layer = func(
            name=node.name,

After Change


        if len(input_names) == 2:
            axes = input_nodes[1].value.val
            reduction_indices = list(axes) if isinstance(axes, Iterable) else [axes]
        elif "reduction_indices" in node.attr:
            reduction_indices = node.attr["reduction_indices"]
        else:
            reduction_indices = node.attr["axis"]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: apple/coremltools
Commit Name: d1e6e624ef891543c5bba32bb0a696d350714693
Time: 2019-08-20
Author: smq@apple.com
File Name: coremltools/converters/nnssa/coreml/ssa_converter.py
Class Name: SSAConverter
Method Name: _convert_reduction


Project Name: apple/coremltools
Commit Name: d1e6e624ef891543c5bba32bb0a696d350714693
Time: 2019-08-20
Author: smq@apple.com
File Name: coremltools/converters/nnssa/coreml/ssa_converter.py
Class Name: SSAConverter
Method Name: _convert_transpose


Project Name: apple/coremltools
Commit Name: d1e6e624ef891543c5bba32bb0a696d350714693
Time: 2019-08-20
Author: smq@apple.com
File Name: coremltools/converters/nnssa/coreml/ssa_converter.py
Class Name: SSAConverter
Method Name: _convert_pad