diff options
author | Jordan Gong <jordan.gong@protonmail.com> | 2020-12-23 20:15:14 +0800 |
---|---|---|
committer | Jordan Gong <jordan.gong@protonmail.com> | 2020-12-23 20:15:14 +0800 |
commit | 7460ce2c8904a009f2f1139b11ec18faf208d6d2 (patch) | |
tree | 6f394b4072ba2c670c1eaabd4da1f2a1d0c8b047 /models | |
parent | fa745aa38edce88f5d92e7f7242a111c3d892161 (diff) |
Reshape feature before decode
Diffstat (limited to 'models')
-rw-r--r-- | models/auto_encoder.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/models/auto_encoder.py b/models/auto_encoder.py index e35ed23..1708bc9 100644 --- a/models/auto_encoder.py +++ b/models/auto_encoder.py @@ -79,9 +79,10 @@ class Decoder(nn.Module): def forward(self, fa, fgs, fgd): x = torch.cat((fa, fgs, fgd), dim=1).view(-1, self.em_dim) x = F.leaky_relu(self.batch_norm_fc(self.fc(x)), 0.2) + x = x.view(-1, 64 * 8, 4, 2) x = F.leaky_relu(self.batch_norm1(self.trans_conv1(x)), 0.2) x = F.leaky_relu(self.batch_norm2(self.trans_conv2(x)), 0.2) x = F.leaky_relu(self.batch_norm3(self.trans_conv3(x)), 0.2) x = F.sigmoid(self.trans_conv4(x)) - return x
\ No newline at end of file + return x |