From 8cb33f20c653140922ca9daab38ad52045c03ac1 Mon Sep 17 00:00:00 2001 From: Kashif Rasul Date: Mon, 13 Jan 2020 19:52:47 +0100 Subject: [PATCH] shape has to be a tuple --- pts/modules/flows.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pts/modules/flows.py b/pts/modules/flows.py index ad5c442..8a72b9d 100644 --- a/pts/modules/flows.py +++ b/pts/modules/flows.py @@ -196,9 +196,9 @@ class RealNVP(nn.Module): def sample(self, sample_shape=torch.Size()): if self.cond is not None: - shape = self.cond.shape[:-1] + (self.input_size) + shape = self.cond.shape[:-1] + (self.input_size,) else: - shape = sample_shape + (self.input_size) + shape = sample_shape + (self.input_size,) # if len(sample_shape) > 0: # shape = sample_shape + (self.input_size)