7d0d0e6e8b9ef3bb5ed979f6716c84c629eae7a8,src/graph_transpiler/webdnn/graph/converters/keras.py,,_convert_flatten,#Any#Any#,405

Before Change


    :return:
    
    assert len(operator.inputs) == 1
    x = converter.get_variable(operator.inputs[0])
    in_axes = x.order.axes.copy()
    assert in_axes[0] == Axis.N
    in_axes.remove(Axis.N)
    flatten_opr = Flatten(None, in_axes=in_axes, out_axis=Axis.C)
    y, = flatten_opr(x)

    converter.set_variable(operator.get_output_key(0), y)


@KerasConverter.register_handler("Concatenate")
def _convert_concatenate(converter: KerasConverter, operator: KerasOperator):

After Change


    flatten_opr = Flatten(None, in_axes=in_axes, out_axis=Axis.C)
    y, = flatten_opr(x)

    operator.outputs = [y]


@KerasConverter.register_handler("Concatenate")
def _convert_concatenate(converter: KerasConverter, operator: KerasOperator):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 7

Non-data size: 7

Instances


Project Name: mil-tokyo/webdnn
Commit Name: 7d0d0e6e8b9ef3bb5ed979f6716c84c629eae7a8
Time: 2017-06-18
Author: hidaka@mi.t.u-tokyo.ac.jp
File Name: src/graph_transpiler/webdnn/graph/converters/keras.py
Class Name:
Method Name: _convert_flatten


Project Name: mil-tokyo/webdnn
Commit Name: 7d0d0e6e8b9ef3bb5ed979f6716c84c629eae7a8
Time: 2017-06-18
Author: hidaka@mi.t.u-tokyo.ac.jp
File Name: src/graph_transpiler/webdnn/graph/converters/keras.py
Class Name:
Method Name: _convert_add


Project Name: mil-tokyo/webdnn
Commit Name: 7d0d0e6e8b9ef3bb5ed979f6716c84c629eae7a8
Time: 2017-06-18
Author: hidaka@mi.t.u-tokyo.ac.jp
File Name: src/graph_transpiler/webdnn/graph/converters/keras.py
Class Name:
Method Name: convert_layer_average_pooling2d


Project Name: mil-tokyo/webdnn
Commit Name: 7d0d0e6e8b9ef3bb5ed979f6716c84c629eae7a8
Time: 2017-06-18
Author: hidaka@mi.t.u-tokyo.ac.jp
File Name: src/graph_transpiler/webdnn/graph/converters/keras.py
Class Name:
Method Name: _convert_zero_padding2d


Project Name: mil-tokyo/webdnn
Commit Name: 7d0d0e6e8b9ef3bb5ed979f6716c84c629eae7a8
Time: 2017-06-18
Author: hidaka@mi.t.u-tokyo.ac.jp
File Name: src/graph_transpiler/webdnn/graph/converters/keras.py
Class Name:
Method Name: _convert_max_pooling2d


Project Name: mil-tokyo/webdnn
Commit Name: 7d0d0e6e8b9ef3bb5ed979f6716c84c629eae7a8
Time: 2017-06-18
Author: hidaka@mi.t.u-tokyo.ac.jp
File Name: src/graph_transpiler/webdnn/graph/converters/keras.py
Class Name:
Method Name: convert_layer_global_average_pooling2d


Project Name: mil-tokyo/webdnn
Commit Name: 7d0d0e6e8b9ef3bb5ed979f6716c84c629eae7a8
Time: 2017-06-18
Author: hidaka@mi.t.u-tokyo.ac.jp
File Name: src/graph_transpiler/webdnn/graph/converters/keras.py
Class Name:
Method Name: _convert_concatenate