From ca523215c66fb24f9fc61bc280dfdfe79f34d95f Mon Sep 17 00:00:00 2001 From: James Betker Date: Mon, 12 Oct 2020 17:42:32 -0600 Subject: [PATCH] Fix recurrent std in arch --- codes/models/archs/StructuredSwitchedGenerator.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/codes/models/archs/StructuredSwitchedGenerator.py b/codes/models/archs/StructuredSwitchedGenerator.py index 058f6c61..6df031b6 100644 --- a/codes/models/archs/StructuredSwitchedGenerator.py +++ b/codes/models/archs/StructuredSwitchedGenerator.py @@ -204,7 +204,9 @@ class SSGr1(SwitchModelBase): x = self.model_fea_conv(x) if self.recurrent: rec = self.recurrent_process(recurrent) - x = self.recurrent_join(x, rec) + x, recurrent_join_std = self.recurrent_join(x, rec) + else: + recurrent_join_std = 0 x1, a1 = checkpoint(self.sw1, x, ref_embedding) x_grad = self.grad_conv(x_grad) @@ -319,7 +321,7 @@ class SSGDeep(SwitchModelBase): x = self.model_fea_conv(x) if self.recurrent: rec = self.recurrent_process(recurrent) - x = self.recurrent_join(x, rec) + x, recurrent_std = self.recurrent_join(x, rec) x1, a1 = checkpoint(self.sw1, x, ref_embedding) x2, a2 = checkpoint(self.sw2, x1, ref_embedding)