51bd1f486dbb44d63abfd891b163bcebd088f9a7,src/graph_transpiler/webdnn/frontend/keras.py,,convert_layer_global_average_pooling2d,#Any#Any#,462

Before Change


    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(y)

    operator.outputs = [y]

After Change


    y, = average_pooling_2d_opr(x)

    // flatten without changing memory layout
    reshape_opr = Reshape(None, in_order=y.order, out_order=OrderNC, out_shape=[y.shape[0], mul(y.shape[1:])])
    z, = reshape_opr(y)

    operator.outputs = [z]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: mil-tokyo/webdnn
Commit Name: 51bd1f486dbb44d63abfd891b163bcebd088f9a7
Time: 2017-06-29
Author: hidaka@mi.t.u-tokyo.ac.jp
File Name: src/graph_transpiler/webdnn/frontend/keras.py
Class Name:
Method Name: convert_layer_global_average_pooling2d


Project Name: jhfjhfj1/autokeras
Commit Name: b1bfd16945a658d02847209e46a2ba8d72b456e1
Time: 2019-07-01
Author: jhfjhfj1@gmail.com
File Name: autokeras/hypermodel/hyper_block.py
Class Name: RNNBlock
Method Name: build


Project Name: mil-tokyo/webdnn
Commit Name: 51bd1f486dbb44d63abfd891b163bcebd088f9a7
Time: 2017-06-29
Author: hidaka@mi.t.u-tokyo.ac.jp
File Name: src/graph_transpiler/webdnn/frontend/keras.py
Class Name:
Method Name: _convert_flatten