7877691fdca200bfd318614da06adfe2b9196b29,src/graph_transpiler/webdnn/frontend/chainer/functions/math.py,,_convert_min,#Any#Any#,232

Before Change


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


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

After Change



@ChainerConverter.register_handler("Min")
def _convert_min(converter: ChainerConverter, c_op: "chainer.functions.Min"):
    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, = Min(None, axis=axis)(x)

        if not c_op.keepdims and x.ndim > 1:
            x = x.squeeze(axis)

    converter.set_variable(c_op.outputs[0](), x)


// noinspection PyUnusedLocal
@ChainerConverter.register_handler("Sqrt")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 38

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_min


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: 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_max


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_min