diff options
author | Jordan Gong <jordan.gong@protonmail.com> | 2021-01-21 23:47:52 +0800 |
---|---|---|
committer | Jordan Gong <jordan.gong@protonmail.com> | 2021-01-21 23:47:52 +0800 |
commit | c0c8299354bd41bfd668ff0fb3edb5997f590c5d (patch) | |
tree | 25502d76a218a71ad5c2d51001876b08d734ee47 /models/auto_encoder.py | |
parent | 42847b721a99350e1eed423dce99574c584d97ef (diff) | |
parent | d750dd9dafe3cda3b1331ad2bfecb53c8c2b1267 (diff) |
Merge branch 'python3.8' into python3.7
# Conflicts:
# utils/configuration.py
Diffstat (limited to 'models/auto_encoder.py')
-rw-r--r-- | models/auto_encoder.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/models/auto_encoder.py b/models/auto_encoder.py index 64c52e3..befd2d3 100644 --- a/models/auto_encoder.py +++ b/models/auto_encoder.py @@ -134,15 +134,16 @@ class AutoEncoder(nn.Module): # x_c1_t2 is the frame for later module (f_a_c1_t2, f_c_c1_t2, f_p_c1_t2) = self.encoder(x_c1_t2) - # Decode canonical features for HPM - x_c_c1_t2 = self.decoder( - torch.zeros_like(f_a_c1_t2), f_c_c1_t2, torch.zeros_like(f_p_c1_t2), - no_trans_conv=True - ) - # Decode pose features for Part Net - x_p_c1_t2 = self.decoder( - torch.zeros_like(f_a_c1_t2), torch.zeros_like(f_c_c1_t2), f_p_c1_t2 - ) + with torch.no_grad(): + # Decode canonical features for HPM + x_c_c1_t2 = self.decoder( + torch.zeros_like(f_a_c1_t2), f_c_c1_t2, torch.zeros_like(f_p_c1_t2), + no_trans_conv=True + ) + # Decode pose features for Part Net + x_p_c1_t2 = self.decoder( + torch.zeros_like(f_a_c1_t2), torch.zeros_like(f_c_c1_t2), f_p_c1_t2 + ) if self.training: # t1 is random time step, c2 is another condition |