tensorflow: KeyError: 'ParallelInterleaveDataset' in Tf >= 1.13 (mkl/gpu)
OS Platform and Distribution - Linux Ubuntu 16.04) TensorFlow installed from Anaconda dist 3.6. TensorFlow version 1.13-mkl / 1.13-gpu Python version: Python 3.6.6 :: Anaconda, Inc.
Describe the current behavior*
There is an import error on tf.train.import_meta_graph()
while importing one of the models from the model zoo / coral_ready model. The import works fine on 1.12 but not >= 1.13 ver
Describe the expected behavior
The model should be otherwise loaded with the placeholder and graph
Code to reproduce the issue
Provide a reproducible test case that is the bare minimum necessary to generate the problem.
The model was taken from here - [Model Link] (http://download.tensorflow.org/models/object_detection/ssd_mobilenet_v2_quantized_300x300_coco_2019_01_03.tar.gz)
Model Website
Other info / logs
Traceback (most recent call last):
File "ssd_test.py", line 6, in <module>
model = Importers.ImportMeta(dir_path=model_dir, quantizer='LINEAR')
File "/home/local/SRI/e32640/Documents/aiquantizer/Importers.py", line 89, in __init__
self.import_graph()
File "/home/local/SRI/e32640/Documents/aiquantizer/Importers.py", line 118, in import_graph
clear_devices=True)
File "/home/local/SRI/e32640/anaconda3/envs/tf13-gpu/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1435, in import_meta_graph
meta_graph_or_file, clear_devices, import_scope, **kwargs)[0]
File "/home/local/SRI/e32640/anaconda3/envs/tf13-gpu/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1457, in _import_meta_graph_with_return_elements
**kwargs))
File "/home/local/SRI/e32640/anaconda3/envs/tf13-gpu/lib/python3.6/site-packages/tensorflow/python/framework/meta_graph.py", line 806, in import_scoped_meta_graph_with_return_elements
return_elements=return_elements)
File "/home/local/SRI/e32640/anaconda3/envs/tf13-gpu/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 507, in new_func
return func(*args, **kwargs)
File "/home/local/SRI/e32640/anaconda3/envs/tf13-gpu/lib/python3.6/site-packages/tensorflow/python/framework/importer.py", line 399, in import_graph_def
_RemoveDefaultAttrs(op_dict, producer_op_list, graph_def)
File "/home/local/SRI/e32640/anaconda3/envs/tf13-gpu/lib/python3.6/site-packages/tensorflow/python/framework/importer.py", line 159, in _RemoveDefaultAttrs
op_def = op_dict[node.op]
KeyError: 'ParallelInterleaveDataset'
UPDATE [1]: The following code snippet is used for importing the model downloaded from the model zoo
model_dir = 'ssd_mobilenet_v2/'
meta = glob.glob(model_dir + "*.meta")[0]
ckpt = meta.replace('.meta', '').strip()
graph = tf.Graph()
with graph.as_default():
with tf.Session() as sess:
reader = tf.train.import_meta_graph(meta, clear_devices=True)
reader.restore(sess, ckpt)
writer = tf.summary.FileWriter(logdir=model_dir, graph=tf.get_default_graph()) # write to event
writer.flush()
vari = tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES)
for var in vari:
print(var.name, "\n")
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 29 (12 by maintainers)
I know this is an old issue, but would anyone know what the correct conversion would be for
ExperimentalFunctionBufferingResource
? I can’t find it in the file linked.I’m trying to import a checkpoint trained in V1.12 into V2.8.
@jdcast @jsimsa I had the same issue, but somehow fixed it by the following code on TF 1.14.0. I hope this would be helpful to you.
In tensorflow 1.12, also has the problem. How could I give a workaround. Thanks!
Do you mean
FixedLengthRecordDatasetV2
? That operation has not been renamed, so I suspect that is a different issue. Please create a separate issue with details on how to reproduce the error.