Skip to content

Commit c11228a

Browse files
committed
fix avg_pool3d count_include_pad as True,test=develop (#27155)
1 parent a8e355a commit c11228a

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

python/paddle/fluid/tests/unittests/test_pool3d_api.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ def check_max_dygraph_results(self, place):
165165
self.assertTrue(np.allclose(result.numpy(), result_np))
166166

167167
def check_max_dygraph_ndhwc_results(self, place):
168-
print("run ndchw max pool3d")
169168
with fluid.dygraph.guard(place):
170169
input_np = np.random.random([2, 3, 32, 32, 32]).astype("float32")
171170
input = fluid.dygraph.to_variable(
@@ -190,7 +189,6 @@ def check_max_dygraph_ndhwc_results(self, place):
190189
np.transpose(result.numpy(), [0, 4, 1, 2, 3]), result_np))
191190

192191
def check_max_dygraph_ceilmode_results(self, place):
193-
print("run ceil mode max pool3d")
194192
with fluid.dygraph.guard(place):
195193
input_np = np.random.random([2, 3, 32, 32, 32]).astype("float32")
196194
input = fluid.dygraph.to_variable(input_np)

python/paddle/nn/functional/pooling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ def avg_pool3d(x,
389389
stride=None,
390390
padding=0,
391391
ceil_mode=False,
392-
count_include_pad=False,
392+
count_include_pad=True,
393393
divisor_override=None,
394394
data_format="NCDHW",
395395
name=None):

0 commit comments

Comments
 (0)