diff options
author | Jordan Gong <jordan.gong@protonmail.com> | 2021-01-03 20:17:04 +0800 |
---|---|---|
committer | Jordan Gong <jordan.gong@protonmail.com> | 2021-01-03 20:17:04 +0800 |
commit | 89d677873eb1c99070bd9a33a36f4c6415396756 (patch) | |
tree | 1edcde7ab1f5682ed9775ca798d6d66b1f027232 /models/auto_encoder.py | |
parent | df3a8021b528cc7d585dc17d3e1f3c18a20ed963 (diff) |
Delete dead training judge
Diffstat (limited to 'models/auto_encoder.py')
-rw-r--r-- | models/auto_encoder.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/models/auto_encoder.py b/models/auto_encoder.py index ac3cfdf..eaac2fe 100644 --- a/models/auto_encoder.py +++ b/models/auto_encoder.py @@ -122,12 +122,11 @@ class AutoEncoder(nn.Module): self.encoder = Encoder(channels, feature_channels, embedding_dims) self.decoder = Decoder(embedding_dims, feature_channels, channels) - if self.training: - f_c_dim = embedding_dims[1] - self.classifier = nn.Sequential( - nn.LeakyReLU(0.2, inplace=True), - BasicLinear(f_c_dim, num_class) - ) + f_c_dim = embedding_dims[1] + self.classifier = nn.Sequential( + nn.LeakyReLU(0.2, inplace=True), + BasicLinear(f_c_dim, num_class) + ) def forward(self, x_c1_t1, x_c1_t2, x_c2_t2, y=None): # x_c1_t2 is the frame for later module |