RuntimeError: Tensorflow has not been built with TensorRT support

Was this issue resolved? I’m getting the same error when I’m trying to run TensorRT on google colab…

This is my code…

//========================================================
!pip install pillow matplotlib

!pip install tensorflow

print("Tensorflow version: ", tf.version.VERSION)

Load a pre-trained model (e.g., ResNet50)

model = tf.keras.applications.ResNet50(weights=“imagenet”)
model.save(“/content/sample_data/resnet50.keras”) # Save the model

TensorRT conversion parameters

conversion_params = trt.DEFAULT_TRT_CONVERSION_PARAMS._replace(precision_mode=“FP16”)
converter = trt.TrtGraphConverterV2(
input_saved_model_dir=“resnet50_saved_model”,
conversion_params=conversion_params,
)
converter.convert()
converter.save(“resnet50_trt_model”)

print(“TensorRT optimized model saved!”)

//==========================================================
So the tensorflow version is 2.17.1
RuntimeError: Tensorflow has not been built with TensorRT support.
And this is the error I’m getting.

Thanks in advance!!!

Br,
Raghu