From f8b67f134bdd6440908991e7e50c445f65cbbb2b Mon Sep 17 00:00:00 2001 From: James Betker Date: Tue, 16 Jun 2020 14:27:16 -0600 Subject: [PATCH] Get proper contiguous view for backwards compatibility --- codes/models/archs/discriminator_vgg_arch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codes/models/archs/discriminator_vgg_arch.py b/codes/models/archs/discriminator_vgg_arch.py index f86a94fd..744da11d 100644 --- a/codes/models/archs/discriminator_vgg_arch.py +++ b/codes/models/archs/discriminator_vgg_arch.py @@ -57,7 +57,7 @@ class Discriminator_VGG_128(nn.Module): fea = self.lrelu(self.bn4_0(self.conv4_0(fea))) fea = self.lrelu(self.bn4_1(self.conv4_1(fea))) - fea = fea.view(fea.size(0), -1) + fea = fea.contiguous().view(fea.size(0), -1) fea = self.lrelu(self.linear1(fea)) out = self.linear2(fea) return out