Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions Matting/ppmatting/models/human_matting.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,11 +396,11 @@ def forward(self, src, pha, err, hid, tri):

x = paddle.concat([hid, pha, tri], axis=1)
x = F.interpolate(x,
paddle.stack((h_half, w_half)).squeeze(),
(h_half, w_half),
mode='bilinear',
align_corners=False)
y = F.interpolate(src,
paddle.stack((h_half, w_half)).squeeze(),
(h_half, w_half),
mode='bilinear',
align_corners=False)

Expand All @@ -412,12 +412,11 @@ def forward(self, src, pha, err, hid, tri):
x = self.conv2(x)

if self.kernel_size == 3:
x = F.interpolate(x,
paddle.stack((h_full + 4, w_full + 4)).squeeze())
x = F.interpolate(x,(h_full + 4, w_full + 4))
y = F.pad(src, [2, 2, 2, 2])
else:
x = F.interpolate(x,
paddle.stack((h_full, w_full)).squeeze(),
(h_full, w_full),
mode='nearest')
y = src

Expand Down