37ada14728975dcb9fc971bf37ea1fb397e97716,src/graph_transpiler/webdnn/frontend/keras/layers/convolutional.py,,_convert_conv2d_transpose,#Any#Any#,63
Before Change
ksize = tuple(k_op.kernel_size)
stride = tuple(k_op.strides)
if k_op.padding == "valid":
padding = (0, 0)
elif k_op.padding == "same":
// @see https://github.com/tensorflow/tensorflow/blob/e5cf6f0c13b6053e4c58af6a951b204fde263172/tensorflow/python/ops/nn_ops.py//L507-L519
pad_extra_shape = [k - 1 for k in ksize]
if any(p % 2 != 0 for p in pad_extra_shape):
raise NotImplementedError(f
[KerasConverter] Currently WebDNN doesn"t supports different size padding:
(pad_extra_shape)=f{pad_extra_shape})
padding = tuple(p // 2 for p in pad_extra_shape)
else:
raise ValueError(f"[KerasConverter] Unknown padding: {k_op.padding}")
y, = Deconvolution2D(None, ksize=ksize, stride=stride, padding=padding)(x, w)
if k_op.use_bias:
b = converter.convert_to_constant_variable(k_op.bias, OrderC)
y = y + b
After Change
if dilation_rate != (1, 1):
raise NotImplementedError("[KerasConverter] keras.layers.Convolution2DTranspose with large dilation_rate is not supported")
padding = (parse_padding(k_op.padding, ksize[0], dilation_rate[0]) , parse_padding(k_op.padding, ksize[1], dilation_rate[1]))
y, = Deconvolution2D(None, ksize=ksize, stride=stride, padding=padding)(x, w)
if k_op.use_bias:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 9
Instances Project Name: mil-tokyo/webdnn
Commit Name: 37ada14728975dcb9fc971bf37ea1fb397e97716
Time: 2017-11-30
Author: y.kikura@gmail.com
File Name: src/graph_transpiler/webdnn/frontend/keras/layers/convolutional.py
Class Name:
Method Name: _convert_conv2d_transpose
Project Name: mil-tokyo/webdnn
Commit Name: 37ada14728975dcb9fc971bf37ea1fb397e97716
Time: 2017-11-30
Author: y.kikura@gmail.com
File Name: src/graph_transpiler/webdnn/frontend/keras/layers/pooling.py
Class Name:
Method Name: _convert_max_pooling1d
Project Name: mil-tokyo/webdnn
Commit Name: 37ada14728975dcb9fc971bf37ea1fb397e97716
Time: 2017-11-30
Author: y.kikura@gmail.com
File Name: src/graph_transpiler/webdnn/frontend/keras/layers/pooling.py
Class Name:
Method Name: _convert_average_pooling1d