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

out of memory error #24

Open
vishal3477 opened this issue Jan 21, 2021 · 6 comments
Open

out of memory error #24

vishal3477 opened this issue Jan 21, 2021 · 6 comments
Assignees

Comments

@vishal3477
Copy link

vishal3477 commented Jan 21, 2021

@kozistr When I try to run your code, then I am getting a out of memory error. I looked at it and apparently, when you are loading the data, you are storing all images in memory at once, which is causing this error. Can you help me in this matter?

@kozistr
Copy link
Owner

kozistr commented Jan 21, 2021

First of all, thanks for your interest in my repo : )

As you know, I just store all images in ram memory, so maybe 16GB of RAM memory is preferred. However, I also think that this isn't a good way in an aspect of memory usage.

Recently, I tried to refactor the whole code to support TF 2.x while enhancing other features like memory issues.

I can't sure the day when the bugs fixed because I'm tied up with the works :(. But I'll try!

@vishal3477
Copy link
Author

@kozistr So 16 GB memory would be enough for this task considering whole celebA train data? Also, the google drive links that you gave for pretrained models has empty folders. Can you look into this?
Thank you for providing such a great repository.

@kozistr
Copy link
Owner

kozistr commented Jan 22, 2021

@kozistr So 16 GB memory would be enough for this task considering whole celebA train data? Also, the google drive links that you gave for pretrained models has empty folders. Can you look into this?
Thank you for providing such a great repository.

Yes, i tested most of GANs on my desktop, which has 16GB ram. So, 16GB is enough i guess.

Oh, sorry for that. Recently, I just removed the pre-trained models to swap with the new models (TF 1.x -> TF 2.x).
I'll upload pre-trained models after training on TF 2.x.

Thanks in advance!

@vishal3477
Copy link
Author

Thanks for the reply @kozistr . Can you upload the previous models till then? I want to try them for generating images?

@kozistr
Copy link
Owner

kozistr commented Jan 22, 2021

Thanks for the reply @kozistr . Can you upload the previous models till then? I want to try them for generating images?

I just checked my google drive. Unfortunately, The pre-trained model files are already permanently deleted from my google drive (maybe 30 days are passed) : (. sorry for that.

Which type of GAN and dataset do you want to test? If i'm available, i'll adjust a priority to make it first.
Or I'll find another GAN repo so that you can use it.

Thanks

@vishal3477
Copy link
Author

@kozistr That is fine. Actually, I want to experiment with different GANs with different architecture and loss functions. So I guess I can train it on my machine. But the problem is that I am still getting memory error even after trying on a system with 16GB memory. I saw in your code that you are converting the images data into h5 or tf files. Can you provide these files directly if that's possible? I will directly use this files to avoid memory error and train all the models that I want. It would really help if this can be done. Thank you!

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

No branches or pull requests

2 participants