Home > other >  Keyerror tensorflow loaded. Meta data flow diagrams times
Keyerror tensorflow loaded. Meta data flow diagrams times

Time:10-05

The import tensorflow as tf
The import numpy as np

With tf. The Session () as sess:
New_saver=tf. Train. Import_meta_graph (' model. CKPT. Meta)
For var in tf. Trainable_variables () :
Print the var. Name
New_saver. Restore (sess, tf. Train. Latest_checkpoint ('/'))
All_vars=tf. Trainable_variables ()
For v in all_vars:
V_4d=np. Array (sess. Run (v))

Above, for the error code in new_saver=tf. Train. Import_meta_graph (' model. CKPT. Meta) this line error,
Error message is:
Traceback (the most recent call last) :
The File "test2. Py", line 5, in & lt; module>
New_saver=tf. Train. Import_meta_graph (' model. CKPT. Meta)
The File "/usr/local/lib/python2.7/dist - packages/tensorflow/python/training/saver. Py", line 1415, in import_meta_graph
Return _import_meta_graph_def (read_meta_graph_file (meta_graph_or_file))
The File "/usr/local/lib/python2.7/dist - packages/tensorflow/python/training/saver. Py", line 1305, in _import_meta_graph_def
The importer. Import_graph_def (meta_graph_def graph_def, name="")
The File "/usr/local/lib/python2.7/dist - packages/tensorflow/python/framework/importer. Py", line 228, in import_graph_def
Op_def=op_dict [node. The op)
KeyError: u 'VariableV2'

CodePudding user response:

Look at the cause of the error ah TAT for bosses help

CodePudding user response:

Me too!!!!!!!!!!!!!!!!!!!!!!!!!!!! So I still didn't find a solution!!!!!!

CodePudding user response:

Don't know the building Lord solved: no!!!!!!!!!!!!!!!!!!!!

CodePudding user response:

Tensorflow version of model training and execution tf. Train. Import_meta_graph tensorflow version of the agreement on the statement?

CodePudding user response:

My is:
Raise IOError (" does not exist. The File % s "% filename)
Big,,,, is considering process try to lock
  • Related