fast-style-transfer icon indicating copy to clipboard operation
fast-style-transfer copied to clipboard

larger image results in ResourceExhaustError

Open parthi2929 opened this issue 6 years ago • 3 comments

Hi

I understand it could also be likely tensorflow tweaking, but with larger image and using tensorflow-gpu, I get ResourceExhaustedError. Can you kindly check?

This is even without training, but just using checkpoints. I tried reducing batch-size to 1, and still same issue. I also tried soft_config.gpu_options.per_process_gpu_memory_fraction to 0.1, but that does not seem to have any effect

Command:

python evaluate.py --checkpoint ./rain-princess.ckpt --in-path my_photo_1.jpg --out-path ./output_image.jpg

Image size: 5344 x 3006 (4.1 MB)

Error: output_error.txt

parthi2929 avatar Jun 15 '18 09:06 parthi2929

According to the output, it appears that your GPU has 2.00GiB of vram, and unfortunately, for large images being converted to numpy arrays, you would need significantly more memory.

I'm really sorry, but running a large image on GPU might not be an option for you; if you have more RAM on your system, try running on CPU

JEF1056 avatar Oct 02 '18 22:10 JEF1056

How much vram the GPU should have to typically run tensorflow in my system smoothly in GPU mode?

parthi2929 avatar Oct 03 '18 06:10 parthi2929

In most cases, a 2-4gb card is enough (like running a 1920x1080 image), but an image with the longer side being larger than 5000 might need 5-6gb to even be able to allocate enough space for tensorflow.

JEF1056 avatar Oct 03 '18 07:10 JEF1056