报错:
InternalError (see above for traceback): cuDNN launch failure : input shape ([64,112,112,1])[[Node: depth_1/BatchNorm/FusedBatchNorm = FusedBatchNorm[T=DT_FLOAT, data_format=\"NHWC\", epsilon=2e-05, is_training=true, _device=\"/job:localhost/replica:0/task:0/device:GPU:0\"](_arg_depth_0_1/_265, ir_1/BatchNorm/Const, depth/BatchNorm/beta/read, color_1/Conv2d_0/conv/BatchNorm/Const_1, color_1/Conv2d_0/conv/BatchNorm/Const_1)]][[Node: orbbec_ir/accuracy/Mean/_359 = _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_2955_orbbec_ir/accuracy/Mean\", tensor_type=DT_HALF, _device=\"/job:localhost/replica:0/task:0/device:CPU:0\"]()]]
原因是因为显存不够,在你得到程序最上面加上代码:
import osos.environ[\'TF_FORCE_GPU_ALLOW_GROWTH\'] = \'true\'
问题解决。
后来运行程序又遇到这个问题,谷歌了半天,参考GITHUB上看到的方法,后来把
os.environ[\'TF_FORCE_GPU_ALLOW_GROWTH\'] = \'true\'
注掉就又可以运行了,太迷惑了,想不明白是为啥,只想静静。。。