From fb5f54b124b3aeaa00be0931ce9d1835a9a99d71 Mon Sep 17 00:00:00 2001 From: LielinJiang <50691816+LielinJiang@users.noreply.github.com> Date: Tue, 27 Oct 2020 19:47:43 +0800 Subject: [PATCH] fix pool2d (#55) --- ppgan/models/generators/deoldify.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ppgan/models/generators/deoldify.py b/ppgan/models/generators/deoldify.py index ee4b950c73fc3..b806016a6f041 100644 --- a/ppgan/models/generators/deoldify.py +++ b/ppgan/models/generators/deoldify.py @@ -273,7 +273,7 @@ def __init__(self, self.shuf = PixelShuffle(scale) self.pad = ReplicationPad2d([1, 0, 1, 0]) - self.blur = nn.Pool2D(2, pool_stride=1, pool_type='avg') + self.blur = nn.AvgPool2D(2, stride=1) self.relu = relu(True, leaky=leaky) def forward(self, x): @@ -339,7 +339,7 @@ def __init__(self, self.shuf = PixelShuffle(scale) self.pad = ReplicationPad2d([1, 0, 1, 0]) - self.blur = nn.Pool2D(2, pool_stride=1, pool_type='avg') + self.blur = nn.AvgPool2D(2, stride=1) self.relu = nn.LeakyReLU( leaky) if leaky is not None else nn.ReLU() #relu(True, leaky=leaky)