caffe 报错 Check failed: error == cudaSuccess (77 vs. 0) an illegal memory access was encountered

之前从没有遇到这样的问题,找了三个小时的bug和资料后,在此处发现了解决方案,他是这么说的:

In my case the “top” and “bottom” layer in the “deconvolution” layers where the same (save variable but with different num_output) and this cause a strange problem to occur somehow overwriting the data wrongly and producing the error. As soon as I changed them so input and output are stored in separate variables problems was solved.

My advice is try to store variables on every layer in separate memory location and this may solve the problem.

也就是当一个层的bottom和top维度一致时,取同样的名字没问题(比如说relu),但是当两者维度不一致时,就不能取同一个名字。

你可能感兴趣的:(DL,caffe学习)