taigw / brats17

Brain tumor segmentation for MICCAI 2017 BraTS challenge
BSD 3-Clause "New" or "Revised" License
324 stars 130 forks source link

ResourceExhaustedError (see above for traceback): OOM when allocating tensor with shape[5,19,180,160,4] #6

Closed rutujamalani20 closed 6 years ago

rutujamalani20 commented 6 years ago

Specs: Linux-Ubuntu 16.04 Nvidia GEForce 940 MX 2 GB graphics card

Using tensorflow-gpu to run a project in python and have imported niftynet, simpleITK

Following is the error: ResourceExhaustedError (see above for traceback): OOM when allocating tensor with shape[5,19,180,160,4] [[Node: MSNet_WT32_1/block1_1/bn_0/moments/SquaredDifference = SquaredDifference[T=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:GPU:0"](_arg_Placeholder_9_0_0/_5365, MSNet_WT32_1/block1_1/bn_0/moments/StopGradient)]] [[Node: Reshape_19/_5367 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_1584_Reshape_19", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"]()]]

image

Following is the code of test.py test.txt

taigw commented 6 years ago

2GB seems to be not enough for training. It is recommended to use a GPU with memory > 6GB.