I have a keras .pb model which i trained with Tensorflow 1.15.0 and Keras 2.3.1. I want to convert this model tensorrt engine. I tried Using TF-TRT,
from tensorflow.python.compiler.tensorrt import trt_convert as trt
input_saved_model_dir = "my_model.pb" 
output_saved_model_dir = "my_model.engine"
converter = trt.TrtGraphConverter(input_saved_model_dir=input_saved_model_dir)
converter.convert()
converter.save(output_saved_model_dir)

and i am getting this error,
   converter.convert()
  File "/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/compiler/tensorrt/trt_convert.py", line 548, in convert
    self._convert_saved_model()
  File "/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/compiler/tensorrt/trt_convert.py", line 494, in _convert_saved_model
    self._input_saved_model_dir)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/util/deprecation.py", line 324, in new_func
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/saved_model/loader_impl.py", line 268, in load
    loader = SavedModelLoader(export_dir)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/saved_model/loader_impl.py", line 284, in __init__
    self._saved_model = parse_saved_model(export_dir)
  File "/usr/local/lib/python3.6/dist-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: my_model.pb/{saved_model.pbtxt|saved_model.pb}

the name of the model is correct and it’s there in the path…
Any guess why i am getting this error?