7877691fdca200bfd318614da06adfe2b9196b29,src/graph_transpiler/webdnn/frontend/chainer/functions/math.py,,_convert_sum,#Any#Any#,260

Before Change


@ChainerConverter.register_handler("Sum")
def _convert_sum(converter: ChainerConverter, c_op: "chainer.functions.Sum"):
    // TODO
    raise NotImplementedError("[ChainerConverter] Sum is not supported")


// noinspection PyUnusedLocal
@ChainerConverter.register_handler("Arccos")

After Change


def _convert_sum(converter: ChainerConverter, c_op: "chainer.functions.Sum"):
    x = converter.get_variable(c_op.inputs[0])
    for axis in list(x.order.axes) if c_op.axis is None else [x.order.axes[i] for i in c_op.axis]:
        x, = Sum(None, axis=axis)(x)

        if not c_op.keepdims and x.ndim > 1:
            x = x.squeeze(axis)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: mil-tokyo/webdnn
Commit Name: 7877691fdca200bfd318614da06adfe2b9196b29
Time: 2017-11-30
Author: y.kikura@gmail.com
File Name: src/graph_transpiler/webdnn/frontend/chainer/functions/math.py
Class Name:
Method Name: _convert_sum


Project Name: mil-tokyo/webdnn
Commit Name: 5cf0a414aa1f7c17fdc0eced712de551c335a25c
Time: 2017-11-30
Author: y.kikura@gmail.com
File Name: src/graph_transpiler/webdnn/frontend/chainer/functions/activation.py
Class Name:
Method Name: _convert_log_softmax


Project Name: mil-tokyo/webdnn
Commit Name: 84b1ba07f8f80313f7a7853db2aa3cf9f5adf441
Time: 2017-12-12
Author: y.kikura@gmail.com
File Name: src/graph_transpiler/webdnn/frontend/onnx/defs/reduction.py
Class Name:
Method Name: _convert_reduce_sum