Импорт мета-графика Tensorflow KeyError - PullRequest
0 голосов
/ 14 мая 2019

При выполнении команды:

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'

Это ошибка среды выполнения? Или какие настройки я пропустил? Спасибо.

...