a120cb4377c48caba2d2dbb25f126a06568e01be,src/graph_transpiler/webdnn/frontend/keras/layers/pooling.py,,_convert_max_pooling2d,#Any#Any#,33

Before Change


    check_data_format(x, k_op.data_format)

    ksize = tuple(k_op.pool_size)
    stride = tuple(k_op.strides)
    padding = (parse_padding(k_op.padding, ksize[0], 1), parse_padding(k_op.padding, ksize[1], 1))

    if k_op.padding == "same":
        console.warning(

After Change


@KerasConverter.register_handler("MaxPooling2D")
def _convert_max_pooling2d(converter: KerasConverter, k_op: "keras.layers.MaxPooling2D"):
    x = converter.get_variable(converter.get_input_tensor(k_op)[0])
    x, padding = convolution_handler_preprocess(x, ksize=k_op.pool_size, padding=k_op.padding, dilation_rate=(1, 1),
                                                data_format=k_op.data_format)
    y, = MaxPooling2D(None, ksize=k_op.pool_size, stride=k_op.strides, padding=padding, cover_all=False)(x)
    converter.set_variable(converter.get_output_tensor(k_op)[0], y)

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: mil-tokyo/webdnn
Commit Name: a120cb4377c48caba2d2dbb25f126a06568e01be
Time: 2017-12-15
Author: y.kikura@gmail.com
File Name: src/graph_transpiler/webdnn/frontend/keras/layers/pooling.py
Class Name:
Method Name: _convert_max_pooling2d


Project Name: mil-tokyo/webdnn
Commit Name: a120cb4377c48caba2d2dbb25f126a06568e01be
Time: 2017-12-15
Author: y.kikura@gmail.com
File Name: src/graph_transpiler/webdnn/frontend/keras/layers/convolutional.py
Class Name:
Method Name: _convert_conv2d


Project Name: mil-tokyo/webdnn
Commit Name: a120cb4377c48caba2d2dbb25f126a06568e01be
Time: 2017-12-15
Author: y.kikura@gmail.com
File Name: src/graph_transpiler/webdnn/frontend/keras/layers/pooling.py
Class Name:
Method Name: _convert_max_pooling2d