Closed amaanda closed 5 years ago
Hi, this is a tricky problem. You can either reduce the batch size or select a more lightweight encoder (e.g. vgg). The latter one should affect the performance. I'm afraid there are no other easy ways for reducing the gpu momery usage with just a few lines of magic codes. Nevertheless, you can turn to the works in model compression for help.
Yes, I imagine there is no magic trick to get it done easily haha I already reduced batch size to 1 previously and it did reduce the problem, will try changing the encoder then. Thanks for your suggestions!
Hello! I wonder if there is any part in your code where I can set a parameter to use less gpu memory, or if you know of some way to do it using pytorch. I need to do this without losing precision, so resizing the input image is not an opition.
Thanks!