Closed muneebaadil closed 6 years ago
Hello.
You can change args.chop_size
to handle this issue.
Please try with smaller chop_size.
Thank you.
I couldn't find any option for chop_size
in command line arguments.
However, for quick testing, I did change the function prototype for smaller chop_size, like so:
def chop_forward(x, model, scale, shave=10, min_size=2000, nGPUs=1):
But it is still giving the same error.
I tested your script with 1080Ti (11GB RAM) without changing chop_size option, but I did not get any error. I also checked that the process consumes < 5000MB RAM. Maybe there are some other issues that additionally consume your RAM.
Checked with nvidia-smi
and there's no other process that seems to be taking GPU memory. Furthermore, during training, EDSR takes around 6000MB RAM so I guess that's fine. Not sure what might be causing memory error during test time.
Could you kindly paste your script command here?
I used the same script you uploaded:
python main.py --dir_data /datadrive --scale 4 --n_train 790 --n_val 10 --offset_val 790 --print_model --model EDSR --n_feats 256 --n_resblocks 32 --patch_size 96 --chop_forward --test_only
Unfortunately, I am not sure what the exact problem is.
Maybe you can try --precision half
argument I have just pushed to use less memory at test time.
Thank you.
Hi Muneebaadil, may I ask if you have solved the problem? We've got the same issue while doing the training step.
Unfortunately, no. Although I did test the code in another GPU and it runs fine there. So, currently my best guess is that it has something to do with CUDA. I'll try reconfiguring CUDA and will let you know about it.
I reconfigured CUDA from scratch, and the problem has vanished. Weird though. Closing this issue now..
I get the same out of memory error (in 11GB GPU RAM) when running final model of EDSR. And I also get the same error when I try to change min_size = 2000. Howerer, when I set the batch_size to 10, I find that this problem does not occur.
I get
out of memory
error (in 12GB GPU RAM) when running final model of EDSR.Python command is attached below for your reference