未验证 提交 17db031a 编写于 作者: D Double_V 提交者: GitHub

fix pool bug, test=develop (#28359)

上级 6115c14f
......@@ -230,7 +230,7 @@ def avg_pool1d(x,
x, 'pooling_type', 'avg', 'ksize', kernel_size, 'global_pooling',
False, 'strides', stride, 'paddings', padding, 'padding_algorithm',
padding_algorithm, 'use_cudnn', True, 'ceil_mode', ceil_mode,
'use_mkldnn', False, 'exclusive', not exclusive, 'data_format',
'use_mkldnn', False, 'exclusive', exclusive, 'data_format',
data_format)
return squeeze(output, [2])
......@@ -338,7 +338,7 @@ def avg_pool2d(x,
x, 'pooling_type', 'avg', 'ksize', kernel_size, 'global_pooling',
False, 'padding_algorithm', padding_algorithm, 'strides', stride,
'paddings', padding, 'use_cudnn', True, 'ceil_mode', ceil_mode,
'use_mkldnn', False, 'exclusive', not exclusive, 'data_format',
'use_mkldnn', False, 'exclusive', exclusive, 'data_format',
data_format)
if divisor_override is None:
return output
......@@ -452,7 +452,7 @@ def avg_pool3d(x,
x, 'pooling_type', 'avg', 'ksize', kernel_size, 'strides', stride,
'paddings', padding, 'global_pooling', False, 'padding_algorithm',
padding_algorithm, 'use_cudnn', True, 'ceil_mode', ceil_mode,
'use_mkldnn', False, 'exclusive', not exclusive, 'data_format',
'use_mkldnn', False, 'exclusive', exclusive, 'data_format',
data_format)
if divisor_override is None:
return output
......
......@@ -503,6 +503,7 @@ class MaxPool2D(layers.Layer):
stride=self.stride,
padding=self.padding,
return_mask=self.return_mask,
ceil_mode=self.ceil_mode,
data_format=self.data_format,
name=self.name)
......@@ -594,6 +595,7 @@ class MaxPool3D(layers.Layer):
stride=self.stride,
padding=self.padding,
return_mask=self.return_mask,
ceil_mode=self.ceil_mode,
data_format=self.data_format,
name=self.name)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册