-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Huge GPU memory usage of the Color Histogram Loss #8
Comments
Hi, thanks for your question. There are a couple of options to solve this. First, the RGBuvHistBlock class has some useful options that can reduce memory use. You can reduce the size of images before computing the histogram loss using I am going to add it to the code in the next version. Also, please note that if you are going to reduce the number of bins, you may need to change the histogram boundary (from Finally, I just added other versions of the histogram class to compute histogram loss for other color spaces, like rg-chroma and Lab (for Lab, the input is supposed to be already in CIE LAB space before computing the loss). I hope this helps. |
The code of the other histogram classes is now provided in @FunkyKoki I am going to close this issue. Feel free to reopen it if you are still facing an issue with the GPU memory. |
Hi, thanks for your great work, it makes sense very much.
When I was going to apply the Color Histogram Loss in my work, I found that this loss occupies a lot of CUDA memory, is this normal?
For example, the model I used to train can be trained with batchsize = 16 and GPU_num = 4, but when I use this loss, the model can only be trained with batchsize = 8 and GPU_num = 8.
😭
The text was updated successfully, but these errors were encountered: