Tensorflow元图导入KeyError

时间:2019-05-14 03:55:19

标签: python gpu

运行命令时:

tfconfig = tf.ConfigProto()
tfconfig.gpu_options.allow_growth = True
model_args = NAME_TO_MODEL[model_name]

graph = tf.Graph()
sess = tf.Session(graph=graph, config=tfconfig)

with sess.graph.as_default():
    # image_input_ = tf.placeholder(tf.float32, shape=(None, 300, 300, 3), name='image_input')

    # create model graph input map
    # graph_map = {model_args['input_tensor']:patched_input_}
    graph_name = 'detection/'
    #ckpt = tf.train.get_checkpoint_state(model['path'])
    with sess:
        print('lala')
        pdb.set_trace()

        detection_graph = tf.train.import_meta_graph(model_args['path'] + '/model.ckpt' + '.meta', import_scope='detection',
                            clear_devices=True)  # ,input_map=graph_map)`

与 (Pdb)tf。版本 '1.6.0', 它显示以下错误。

2019-05-14 11:33:33.234998: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA 2019-05-14 11:33:33.516485: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:898] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2019-05-14 11:33:33.518401: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1212] Found device 0 with properties: name: Tesla P40 major: 6 minor: 1 memoryClockRate(GHz): 1.531 pciBusID: 0000:00:07.0 totalMemory: 22.38GiB freeMemory: 22.22GiB 2019-05-14 11:33:33.518488: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1312] Adding visible gpu devices: 0 2019-05-14 11:33:34.062238: I tensorflow/core/common_runtime/gpu/gpu_device.cc:993] Creating TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 21561 MB memory) -> physical GPU (device: 0, name: Tesla P40, pci bus id: 0000:00:07.0, compute capability: 6.1) lala Traceback (most recent call last): File "rcnn_mobilenet.py", line 139, in <module> main(parse_arguments(sys.argv[1:])) File "rcnn_mobilenet.py", line 106, in main clear_devices=False) # ,input_map=graph_map) File "/home/anaconda2_new/envs/faceswap-GAN/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1909,in import_meta_graph **kwargs) File "/home/anaconda2_new/envs/faceswap-GAN/lib/python3.6/site-packages/tensorflow/python/framework/meta_graph.py", line737, in import_scoped_meta_graph producer_op_list=producer_op_list) File "/home/anaconda2_new/envs/faceswap-GAN/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 432, in new_func return func(*args, **kwargs) File "/home/anaconda2_new/envs/faceswap-GAN/lib/python3.6/site-packages/tensorflow/python/framework/importer.py", line 431, in import_graph_def _RemoveDefaultAttrs(op_dict, producer_op_list, graph_def) File "/home/anaconda2_new/envs/faceswap-GAN/lib/python3.6/site-packages/tensorflow/python/framework/importer.py", line 211, in _RemoveDefaultAttrs op_def = op_dict[node.op] KeyError: 'NonMaxSuppressionV3'

这是运行环境错误吗?还是我错过了什么设置?谢谢。

0 个答案:

没有答案