Unsuccessful TensorSliceReader constructor: Failed to get matching files on input/variables/variables: Not found: input/variables; No such file or directory
Closed this issue · 0 comments
Am having some trouble optimising a Tensorflow graph using TensorRT (TF-TRT). I am using the code snippet from here
Here is the code snippet:
from tensorflow.python.compiler.tensorrt import trt_convert as trt
converter = trt.TrtGraphConverterV2(input_saved_model_dir=input_saved_model_dir)
converter.convert()
converter.save(output_saved_model_dir)
I am using this model. https://tfhub.dev/tensorflow/faster_rcnn/inception_resnet_v2_640x640/1
This is the complete error message:
Traceback (most recent call last): File "convert.py", line 12, in <module> converter.convert() File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/compiler/tensorrt/trt_convert.py", line 1085, in convert self._input_saved_model_tags) File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/saved_model/load.py", line 603, in load return load_internal(export_dir, tags, options) File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/saved_model/load.py", line 633, in load_internal ckpt_options) File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/saved_model/load.py", line 131, in __init__ self._restore_checkpoint() File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/saved_model/load.py", line 330, in _restore_checkpoint load_status = saver.restore(variables_path, self._checkpoint_options) File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/training/tracking/util.py", line 1275, in restore reader = py_checkpoint_reader.NewCheckpointReader(save_path) File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/training/py_checkpoint_reader.py", line 95, in NewCheckpointReader return CheckpointReader(compat.as_bytes(filepattern)) ValueError: Unsuccessful TensorSliceReader constructor: Failed to get matching files on input/variables/variables: Not found: input/variables; No such file or directory
Questions:
- What is this variables file it is looking for
- And where do I get one of those for a pre-trained model.