AlexHex7 / SimGAN_pytorch

[Refer to wayaai/SimGAN(Keras&Tensorflow)] Implementation of Apple's Learning from Simulated and Unsupervised Images through Adversarial Training
41 stars 9 forks source link

Size of Real Image & Synthetic Image not matching #1

Open nitish116 opened 6 years ago

nitish116 commented 6 years ago

You put an assert statement to check , if size of real images and synthetic images are matching for pre training Discriminator , but the sizes are different

128 != 52 , because of this it is throwing an error.

Why is that necessary ? How do I fix the error ? Am I working with wrong dataset ?

AlexHex7 commented 6 years ago

I couldn't remember the details, but this assert means the batch size of real image and synthetic image must be equal. If it is not equal, it can not calculate the loss. In fact, most people use data_loader to load the image now, and pass the batch size parameter to it. I think you should check the code of loading images.

Temofey commented 2 years ago

Ошибка из-за того что в наборе данных с реальными изображениями находится всего 52 картинки. Я решил проблему тем, что просто уменьшил batch_size до 32