Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experiencing model collapse #4

Open
demiahmed opened this issue Mar 28, 2022 · 1 comment
Open

Experiencing model collapse #4

demiahmed opened this issue Mar 28, 2022 · 1 comment

Comments

@demiahmed
Copy link

demiahmed commented Mar 28, 2022

Hi first of all thanks for this notebook it works very well as expected. However, in my dataset size of around 5k diverse images I experience a model collapse. i.e, the variability of the generator is too low (it makes images that are almost the same - cycles around 2 or 3 images only).

I would like to increase the size of the latent vector. Could you please point me in the right direction?

This is what I'm currently doing

old

self.G.add(Reshape(target_shape = [1, 1, 4096], input_shape = [4096]))

new

self.G.add(Reshape(target_shape = [1, 1, 4096], input_shape = [100]))

But I am getting an error while compiling the model. Any help or pointers would be much appreciated.

@TTK95
Copy link

TTK95 commented Apr 4, 2022

You want to reshape a Tensor with shape 1x100 into a Tensor with shape 1x1x4096..
try: self.G.add(Reshape(target_shape = [1, 1, 100], input_shape = [100]))

but if you want to increase the input vector, try:
self.G.add(Reshape(target_shape = [1, 1, 4096*X], input_shape = [4096*X])) where X = 1,2,3,...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants