KittiSeg icon indicating copy to clipboard operation
KittiSeg copied to clipboard

OOM problem.

Open RichardChe opened this issue 7 years ago • 8 comments

Hello, when I run the demo using

python demo.py --input_image data/demo/demo.png

the following error occurs:

ResourceExhaustedError (see above for traceback): OOM when allocating tensor with shape[7,7,512,4096] [[Node: save/Assign_27 = Assign[T=DT_FLOAT, _class=["loc:@fc6/weights"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/gpu:0"](fc6/weights, save/RestoreV2_27/_25)]]

It seems that my RAM is not large enough. I use my laptop, with 8G RAM and GeForce 940M (1G memory). What is the minimum size required?

Thanks.

RichardChe avatar Jun 06 '17 16:06 RichardChe

my desktop computer :4GB RAM,940M(1GB),and program is running in Virtual Machine,it runs well.

daixiaogang avatar Jun 07 '17 08:06 daixiaogang

The RAM required is a function of the input image size. What happens when you try a smaller image? Additionally, higher up in the stack trace there should be some info about memory usage to see if all of your RAM is actually being eaten up by demo.py

villanuevab avatar Jun 07 '17 13:06 villanuevab

You need more GPU memory. 2GB should be fine for inference. Training is possible with 8GB. You use the cpu version of tensorflow to run demo.py. 8GB CPU memory will be fine.

MarvinTeichmann avatar Jun 07 '17 13:06 MarvinTeichmann

@daixiaogang Which version of tensorflow are you using, CPU or GPU?

RichardChe avatar Jun 08 '17 12:06 RichardChe

@RichardChe ,CPU

daixiaogang avatar Jun 12 '17 14:06 daixiaogang

Hi, How to configure train.py to run in CPU mode only?

maiiDeep avatar Jul 30 '17 17:07 maiiDeep

you need to install the cpu version of tensorflow.

MarvinTeichmann avatar Aug 03 '17 16:08 MarvinTeichmann

You can also cutoff GPU access to the script running train.py.

varun19299 avatar May 22 '18 15:05 varun19299