一、环境问题
TensorFlow1.12和cuda版本、cudnn版本匹配问题,折腾了很久,报错信息大概是这样:
tensorflow.python.framework.errors_impl.InternalError: cuDNN launch failure : input shape([1,3,805,1093]) filter shape([7,7,3,64])
[[node conv0/Conv2D (defined at /home/**/.local/lib/python3.6/site-packages/tensorpack/models/conv2d.py:76) = Conv2D[T=DT_FLOAT, data_format="NCHW", dilations=[1, 1, 1, 1], padding="VALID", strides=[1, 1, 2, 2], use_cudnn_on_gpu=true, _device="/job:localhost/replica:0/task:0/device:GPU:0"](Pad, conv0/W/read)]]
换掉TensorFlow版本后,会出cuda相关的错,找不到cudnn.h类似的,各种切换版本,最后是TensorFlow1.14+cuda10.0+cudnn解决的。
二、代码跑通后的问题
输出的AP和Recall极不正常,几乎为零,后来发现是annotations里bbox的id有问题,coco应该是一直累加的,而我是每个图片里的各个bbox均从0开始