CSAILVision / gandissect

Pytorch-based tools for visualizing and understanding the neurons of a GAN. https://gandissect.csail.mit.edu/
MIT License
1.77k stars 282 forks source link

RuntimeError: CUDA error: out of memory #8

Closed Zengpr closed 5 years ago

Zengpr commented 5 years ago

I have the problem: RuntimeError: CUDA error: out of memory

although I have change the batch_size to 1

davidbau commented 5 years ago

Do you know what stage of the computation is running out of memory? I.e., is it at the beginning, when it is collecting quantile data?

If you specify fewer layers to dissect, it will take less memory. Also, if you take care to dissect layers which have smaller representations (e.g., lower resolution), it will take less memory - and often these smaller representation layers are the interesting ones also.

davidbau commented 5 years ago

Feel free to contact me with more details if the tips above don't work for you.