mjdietzx / SimGAN

Implementation of Apple's Learning from Simulated and Unsupervised Images through Adversarial Training
MIT License
411 stars 101 forks source link

Bug in image_history_buffer #18

Open davideh29 opened 5 years ago

davideh29 commented 5 years ago

In "add_to_image_history_buffer" I believe that you have to assign the result of the np.append() to the image buffer array:

self.image_history_buffer = np.append(self.image_history_buffer, images[:nb_to_add], axis=0)

Otherwise the value is not updated. I had to make the change in my implementation to get it to work

davideh29 commented 5 years ago

https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.append.html

"Note that append does not occur in-place: a new array is allocated and filled"