Skip to content

Commit cdd9002

Browse files
Add missing LeakyReLU after ConvBlock in Discriminator fromRGB (#54)
* added LeakyReLU after ConvBlock in `self.from_rgb` * fix formatting
1 parent e3d2341 commit cdd9002

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pro_gan_pytorch/networks.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
GenInitialBlock,
1313
)
1414
from torch import Tensor
15-
from torch.nn import Conv2d, ModuleList
15+
from torch.nn import Conv2d, LeakyReLU, ModuleList, Sequential
1616
from torch.nn.functional import avg_pool2d, interpolate
1717

1818

@@ -160,7 +160,10 @@ def __init__(
160160
self.from_rgb = ModuleList(
161161
reversed(
162162
[
163-
ConvBlock(num_channels, nf(stage), kernel_size=(1, 1))
163+
Sequential(
164+
ConvBlock(num_channels, nf(stage), kernel_size=(1, 1)),
165+
LeakyReLU(0.2)
166+
)
164167
for stage in range(1, depth)
165168
]
166169
)

0 commit comments

Comments
 (0)