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

Before Change


    def _convert_reduction(self, node):
        assert len(node.inputs) == 2
        input_name = self._get_input_tensors(node)[0]
        reduction_indices = node.attr.get("reduction_indices")
        keepdims = node.attr.get("keep_dims")
        op = node.op.lower()  // type of the unary operator
        if op in ["all", "any"]:
            op = "prod" if op == "all" else "sum"

After Change


        else:
            reduction_indices = node.attr["axis"]

        if "keep_dims" in node.attr:
            keepdims = node.attr["keep_dims"]
        else:
            keepdims = node.attr["keepdims"]

        op = node.op.lower()  // type of the unary operator
        if op in ["all", "any"]:
            op = "prod" if op == "all" else "sum"
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

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: analysiscenter/batchflow
Commit Name: bdd2b2603416dc51a744c302eee371441dee3883
Time: 2017-04-18
Author: rhudor@gmail.com
File Name: dataset/pipeline.py
Class Name: Pipeline
Method Name: run


Project Name: NeuromorphicProcessorProject/snn_toolbox
Commit Name: 5c3de2518362675e14b15f87044742a94b816ef2
Time: 2019-08-20
Author: bodo.rueckauer@intel.com
File Name: snntoolbox/simulation/target_simulators/loihi_target_sim.py
Class Name: SNN
Method Name: add_layer