1

Below output_saved_model_dir in this directory i am having trt file named final_model_gender_classification_gpu0_int8.trt

output_saved_model_dir='/home/cocoslabs/Downloads/age_gender_trt'
saved_model_loaded = tf.saved_model.load(output_saved_model_dir, tags=[tag_constants.SERVING])

When I run the above script it showing error as follows:

File "test.py", line 7, in <module>
    saved_model_loaded = tf.saved_model.load(output_saved_model_dir, tags=[tag_constants.SERVING])
  File "/home/cocoslabs/deepstream_docker/venv/lib/python3.6/site-packages/tensorflow_core/python/saved_model/load.py", line 528, in load
    return load_internal(export_dir, tags)
  File "/home/cocoslabs/deepstream_docker/venv/lib/python3.6/site-packages/tensorflow_core/python/saved_model/load.py", line 537, in load_internal
    saved_model_proto = loader_impl.parse_saved_model(export_dir)
  File "/home/cocoslabs/deepstream_docker/venv/lib/python3.6/site-packages/tensorflow_core/python/saved_model/loader_impl.py", line 83, in parse_saved_model
    constants.SAVED_MODEL_FILENAME_PB))
OSError: SavedModel file does not exist at: /home/cocoslabs/Downloads/age_gender_trt/{saved_model.pbtxt|saved_model.pb}

From the above error what I understand is tf.saved_model.load() accept only .pb or .pbtxt files. Is it right ? But as per this link Load and run test a .trt model what they said is tf.saved_model.load() function will accept .trt file. Help me to rectify this error. Thank You.

Pavithran
  • 41
  • 3

0 Answers0