Skip to content

Commit

Permalink
replace ConvTranspose2d by up refle conv2d
Browse files Browse the repository at this point in the history
  • Loading branch information
adeshkin authored Oct 20, 2023
1 parent d484d10 commit bcb1484
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions models/networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,10 +357,10 @@ def __init__(self, input_nc, output_nc, ngf=64, norm_layer=nn.BatchNorm2d, use_d

for i in range(n_downsampling): # add upsampling layers
mult = 2 ** (n_downsampling - i)
model += [nn.ConvTranspose2d(ngf * mult, int(ngf * mult / 2),
kernel_size=3, stride=2,
padding=1, output_padding=1,
bias=use_bias),
model += [nn.Upsample(scale_factor = 2, mode='bilinear'),
nn.ReflectionPad2d(1),
nn.Conv2d(ngf * mult, int(ngf * mult / 2),
kernel_size=3, stride=1, padding=0),
norm_layer(int(ngf * mult / 2)),
nn.ReLU(True)]
model += [nn.ReflectionPad2d(3)]
Expand Down

0 comments on commit bcb1484

Please sign in to comment.