ImageProjectiveTransformV2 error in loading meta graph by import_meta_graph

508 views Asked by At

I am trying to load meta graph of trained networks "name.ckpt-1.meta" using tf.train.import_meta_graph("./name.ckpt-1.meta") but the following error appears:

Traceback (most recent call last):
  File "/home/rapsodo/.local/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 3265, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-7-634d5d15ac05>", line 1, in <module>
    saver = tf.train.import_meta_graph(input_checkpoint + '.meta', clear_devices=False)
  File "/home/rapsodo/workspace_mike3352/anaconda2/envs/mike_tfpy36/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1960, in import_meta_graph
    **kwargs)
  File "/home/rapsodo/workspace_mike3352/anaconda2/envs/mike_tfpy36/lib/python3.6/site-packages/tensorflow/python/framework/meta_graph.py", line 744, in import_scoped_meta_graph
    producer_op_list=producer_op_list)
  File "/home/rapsodo/workspace_mike3352/anaconda2/envs/mike_tfpy36/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 432, in new_func
    return func(*args, **kwargs)
  File "/home/rapsodo/workspace_mike3352/anaconda2/envs/mike_tfpy36/lib/python3.6/site-packages/tensorflow/python/framework/importer.py", line 391, in import_graph_def
    _RemoveDefaultAttrs(op_dict, producer_op_list, graph_def)
  File "/home/rapsodo/workspace_mike3352/anaconda2/envs/mike_tfpy36/lib/python3.6/site-packages/tensorflow/python/framework/importer.py", line 158, in _RemoveDefaultAttrs
    op_def = op_dict[node.op]
KeyError: 'ImageProjectiveTransformV2'

I did not understand the reason and did not saw same thing somewhere else, Im not sure because of the tensorflow version or something else.

1

There are 1 answers

1
Ali On BEST ANSWER

I found the solution; It is because of version mismatch. Newer version of tensorflow does not match with older versions in terms of saving graph etc. If we saved checkpoints with older version, we should use proper version (same version is preferred) to load meta graph or frozen graph.