This is caused by a bug in this line of code:
real_data = self.generator.autoencoder.encode(data).reshape(-1, 1, self.discriminator.output_dim*self.discriminator.output_dim_2) if isinstance(self.discriminator, AutoencoderDiscriminator) and not self.discriminator.encode else data
Specifically, isinstance(self.discriminator, AutoencoderDiscriminator) does not work when using DDP because the discriminator type changes to torch.nn.parallel.distributed.DistributedDataParallel . I'll change it to use self.generator.autoencoder['class']=='AutoencoderDiscriminator' (or something like it, I'll figure it out during debugging) tomorrow.
This is caused by a bug in this line of code:
real_data = self.generator.autoencoder.encode(data).reshape(-1, 1, self.discriminator.output_dim*self.discriminator.output_dim_2) if isinstance(self.discriminator, AutoencoderDiscriminator) and not self.discriminator.encode else data
Specifically,isinstance(self.discriminator, AutoencoderDiscriminator)
does not work when using DDP because the discriminator type changes totorch.nn.parallel.distributed.DistributedDataParallel
. I'll change it to useself.generator.autoencoder['class']=='AutoencoderDiscriminator'
(or something like it, I'll figure it out during debugging) tomorrow.