summaryrefslogtreecommitdiff
path: root/models/auto_encoder.py
diff options
context:
space:
mode:
authorJordan Gong <jordan.gong@protonmail.com>2021-01-21 23:44:34 +0800
committerJordan Gong <jordan.gong@protonmail.com>2021-01-21 23:44:34 +0800
commit0b76205ecef02dd62ef2fbc8e12d9389b7cf7868 (patch)
tree71927f5efe2dc3228f49326a89e2536785aa2eb4 /models/auto_encoder.py
parent8572f5c8292e5798912ad54764c9d3a99afb49ec (diff)
parent04c9d3210ff659bbe00dedb2d193a748e7a97b54 (diff)
Merge branch 'master' into python3.8
# Conflicts: # utils/configuration.py
Diffstat (limited to 'models/auto_encoder.py')
-rw-r--r--models/auto_encoder.py19
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