d1e6e624ef891543c5bba32bb0a696d350714693,coremltools/converters/nnssa/coreml/ssa_converter.py,SSAConverter,_convert_expand_dims,#SSAConverter#Any#,1116

Before Change



    def _convert_expand_dims(self, node):
        input_names = self._get_input_tensors(node)
        g = self._get_current_graph()
        if len(input_names) == 2 and g[node.inputs[1]].attr["value"].val is None:
            raise NotImplementedError("[SSAConverter] Cannot handle dynamic expandDims")

        axes = g[node.inputs[1]].attr["value"].val
        layer = self._get_builder().add_expand_dims(
            name=node.name, input_name=input_names[0], output_name=node.name, axes=axes)
        shapes.propagate_single_layer(layer, self.tensor_shapes)

After Change


        shapes.propagate_single_layer(layer, self.tensor_shapes)

    def _convert_expand_dims(self, node):
        input_nodes, input_names, input_types = self._get_input_tensors(node)
        if _is_scalar(input_types[0]): // skip/identity op in that case
            self.op_tensor_map[node.name] = [input_names[0]]
        if len(input_names) == 2 and input_nodes[1].value.val is None:
            raise NotImplementedError("[SSAConverter] Cannot handle dynamic expandDims")

        axes = input_nodes[1].value.val
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 10

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_expand_dims


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_expand_dims


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_topk