You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for sharing the code. I discovered that the 'generator' generate 64 images each time by 64 different embeddings. However, when I tried to copy embeddings :
for i in range(10):
right_embed[i] = right_embed[0]
it still work and generate normal images with the first 10 images look the same, but when most of embeddings are the same ( range 50 ), the 'generator' cant work and will generate wierd results.
SO, what I should do to generate small number of images by embeddings from 2~3 descriptions, because I cant achieve this by simply copy these embeddings 64 times .
The text was updated successfully, but these errors were encountered:
I believe this problem may be caused by the Batch Normalization layers.
The predict method never calls .eval() on the generator, which means that the BN layers of the generator network are not using the estimated running mean and variance (obtained in training phase). Instead, what is being calculated is the mean and variance of the current batch.
If you set only a few instances of the batch to be the same (10 out of 64), this won't drastically affect the calculation. However, if almost all (or all) instances on the batch are the same, this skews the results of the mean and variance, which leads to problems.
Try adding self.generator.eval() before the self.generator() call. This will also allow you to test using only a few instances, such as N={1,2,3}.
Thank you for sharing the code. I discovered that the 'generator' generate 64 images each time by 64 different embeddings. However, when I tried to copy embeddings :
for i in range(10):
right_embed[i] = right_embed[0]
it still work and generate normal images with the first 10 images look the same, but when most of embeddings are the same ( range 50 ), the 'generator' cant work and will generate wierd results.
SO, what I should do to generate small number of images by embeddings from 2~3 descriptions, because I cant achieve this by simply copy these embeddings 64 times .
The text was updated successfully, but these errors were encountered: