jzbontar / mc-cnn

Stereo Matching by Training a Convolutional Neural Network to Compare Image Patches
BSD 2-Clause "Simplified" License
707 stars 232 forks source link

An error about cuDNN:CUDNN_STATUS_ALLOC_FAILED #11

Open Udonnoodle opened 7 years ago

Udonnoodle commented 7 years ago

hi,Jure I am Hoo Thank you share this code I am a newer in cnn and stereo vision. and I have read your paper about mc-cnn.However, when I run your code on my computer. An error occurs. As show in fig screenshot from 2016-11-08 17-55-09 My computer's GPU is NVIDIA GTX650 with 1g memory.and cuda vision is 8.0,cuDNN vision is 5.0. if I can run your code ,I will buy a better GPU to learning cnn. I have search this error in Google,GPU memory is possible too small to run code.How can I change your code to decrease the GPU memory.or some suggestions else? Thank you very much Please forgive my bad english Hoo

Udonnoodle commented 7 years ago

I have slove this problem ,and anthor problem about cuda complie setting.It run on my computer now. Thank you for sharing code!

shuluoshu commented 7 years ago

@Udonnoodle , Hi, I met a similar problem after I update the torch version to the newest one, the error is as follows: could you help me out? error My cuda is v7.5 and I use cudnnV7.0 Thanks a lot !

shuluoshu commented 7 years ago

I solved the problem by comment 'cudnn.benchmark=True', but I don't know why.

laoreja commented 7 years ago

cudnn.benchmark=True on the doc, it says: uses the inbuilt cudnn auto-tuner to find the fastest convolution algorithms. If this is set to false, uses some in-built heuristics that might not always be fastest.

by default cudnn.benchmark is set to false. Setting to true will improve performance, at the expense of using more memory. The input shape should be the same for each batch, otherwise autotune will re-run for each batch, causing a huge slow-down.