Skip to content

Commit

Permalink
fix pool2d (PaddlePaddle#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
LielinJiang committed Oct 27, 2020
1 parent b4339a5 commit fb5f54b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ppgan/models/generators/deoldify.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit fb5f54b

Please sign in to comment.