summaryrefslogtreecommitdiff
path: root/models/layers.py
diff options
context:
space:
mode:
authorJordan Gong <jordan.gong@protonmail.com>2021-04-03 21:30:35 +0800
committerJordan Gong <jordan.gong@protonmail.com>2021-04-03 23:06:07 +0800
commitf6f133fa7b926ce0c7d28bbf0ba4de41b3708d4a (patch)
tree4bf9b80c1c7a96f081a4e3b3b751145054fccc39 /models/layers.py
parentd12dd6b04a4e7c2b1ee43ab6f36f25d0c35ca364 (diff)
parentb9f35fbe7d78b3c478086ea26c2a76f72ce35687 (diff)
Merge branch 'master' into disentangling_only
# Conflicts: # config.py # models/hpm.py # models/layers.py # models/model.py # models/part_net.py # models/rgb_part_net.py # test/part_net.py # utils/configuration.py # utils/triplet_loss.py
Diffstat (limited to 'models/layers.py')
-rw-r--r--models/layers.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/models/layers.py b/models/layers.py
index 1b4640f..5306769 100644
--- a/models/layers.py
+++ b/models/layers.py
@@ -79,7 +79,9 @@ class DCGANConvTranspose2d(BasicConvTranspose2d):
if self.is_last_layer:
return self.trans_conv(x)
else:
- return super().forward(x)
+ x = self.trans_conv(x)
+ x = self.bn(x)
+ return F.leaky_relu(x, 0.2, inplace=True)
class BasicLinear(nn.Module):