I would suggest reshaping the Z here :



 Janine:

 z = torch.cat((self.label_embedding(labels), noise), -1)


After this line, you can reshape Z to form a 4-D tensor from a 2-D tensor. I assume shape of your z tensor is [32,128] as that is what throws an error. In that case, the reshape can be done as z = z.view( -1,2,8,8)  to start with(insert this line after the z=torch.cat(...) line) . In that case, your model should be :
self.model = nn.Sequential(
            *self._create_layer_1(self.latent_dim + self.classes, 128, False),
            *self._create_layer_2(2, 64),
            *self._create_layer_2(64, 128),
            *self._create_layer_2(128, 256),
            *self._create_layer_2(256, 512),
            *self._create_layer_2(512, 1024),
            nn.Linear(1024, int(np.prod(self.img_shape))),
            nn.Tanh()
        )

Keep in mind that all these changes have to be made in the generator module.