Mask RCNN环境配置中遇到的问题

error1:ValueError: The channel dimension of the inputs should be defined. Found None.

解决方法:我是通过将tensorflow的后端由theano换成tensorflow(直接修改keras_init.py就可以,直接搜索就可以)。再在model = modellib.MaskRCNN(mode="inference", model_dir=MODEL_DIR, config=config)前加上如下的代码:

import keras.backend

K = keras.backend.backend()
if K=='tensorflow':
    keras.backend.set_image_dim_ordering('tf')

(我尝试过直接修改keras_init.py文件中的参数,但是不能奏效,所以还是用了笨办法,在每一运行的文件中,加上这几行代码)

error2:Process finished with exit code 134 (interrupted by signal 6: SIGABRT).

大家搜索到的解决方法,可能是这个链接,或者是由于显卡溢出显存不够导致。但是我的显卡配置很高,超链接的方法也不管用。
我的错误信息还有这些内容

2020-07-27 09:59:31.962338: E tensorflow/stream_executor/cuda/cuda_dnn.cc:378] Loaded runtime CuDNN library: 7300 (compatibility version 7300) but source was compiled with 7004 (compatibility version 7000). If using a binary install, upgrade your CuDNN library to match. If building from sources, make sure the library loaded at runtime matches a compatible version specified during compile configuration.
2020-07-27 09:59:31.963367: F tensorflow/core/kernels/conv_ops.cc:717] Check failed: stream->parent()->GetConvolveAlgorithms( conv_parameters.ShouldIncludeWinogradNonfusedAlgo(), &algorithms)

应该是由于cudnn版本不合适导致的,我是cudnn7300,但是源码是通过7004编译的,所以卸载原来的cudnn,安装正确版本的cudnn就可以了!

你可能感兴趣的:(Mask RCNN环境配置中遇到的问题)