Hi,
I’m using a cycle GAN to transfer image styles. The implementation is based on this repo: https://github.com/eriklindernoren/PyTorch-GAN/blob/master/implementations/cyclegan/cyclegan.py 3
Training works fine, and the pictures saved during training progress are looking good. But I’m having problems with testing the network. The predicted Images differ are very different from the training pictures. Does anyone of you guys experienced same problems?
Here is my code for testing the model. Maybe I’m missing something:
model_instance = Model(settings)
model_instance.load_state(model_path)
ds = Dataset(path_signal_test_csv, path_target_test_csv)
predictionSignal, predictionTarget, recPredSignal, recPredTarget = model_instance.predict(signal, target)


def predict(self, imageA, imageB):
        
        imageA = imageA.to(device=self.device)
        imageB = imageB.to(device=self.device)

        self.G_AB.eval()
        self.G_BA.eval()
        
        with torch.no_grad():
            predictionA = self.G_AB(imageA).to('cuda')
            predictionB = self.G_BA(imageB).to('cuda')

            recPredA = self.G_BA(predictionA).to('cuda')
            recPredB = self.G_AB(predictionB).to('cuda')

return predictionA, predictionB, recPredA, recPredB