diff options
author | Jordan Gong <jordan.gong@protonmail.com> | 2021-02-26 20:21:17 +0800 |
---|---|---|
committer | Jordan Gong <jordan.gong@protonmail.com> | 2021-02-26 20:21:17 +0800 |
commit | 5f75d7ef65f6dcd0e72df320c58b6bd141937b5f (patch) | |
tree | 5649ab28c25dd34d35da815cdbc0e146569373d6 /models/auto_encoder.py | |
parent | 850c525772969823eef6083e8018ac43a1e87e4c (diff) | |
parent | 9001f7e13d8985b220bd218d8de716bc586dbdcf (diff) |
Merge branch 'master' into data_parallel
# Conflicts:
# models/model.py
Diffstat (limited to 'models/auto_encoder.py')
-rw-r--r-- | models/auto_encoder.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/models/auto_encoder.py b/models/auto_encoder.py index 1ef7494..e6a3e60 100644 --- a/models/auto_encoder.py +++ b/models/auto_encoder.py @@ -106,14 +106,14 @@ class Decoder(nn.Module): self.trans_conv4 = DCGANConvTranspose2d(feature_channels, out_channels, is_last_layer=True) - def forward(self, f_appearance, f_canonical, f_pose, cano_only=False): + def forward(self, f_appearance, f_canonical, f_pose, is_feature_map=False): x = torch.cat((f_appearance, f_canonical, f_pose), dim=1) x = self.fc(x) x = x.view(-1, self.feature_channels * 8, self.h_0, self.w_0) x = F.relu(x, inplace=True) x = self.trans_conv1(x) x = self.trans_conv2(x) - if cano_only: + if is_feature_map: return x x = self.trans_conv3(x) x = torch.sigmoid(self.trans_conv4(x)) |