TensorFlow object detection TF-TRT Warning: Could not find TensorRT [closed]
Asked Answered
M

1

18

I have been experimenting trying to solve it for weeks. I am using Google Colaboratory since I got a MacBook Pro with an Apple chip that is not supported by TensorFlow. Here is the Google Colaboratory link with commenting access. Click here.

I have tried using older versions of TensorFlow, but nothing changed, I have the TensorFlow record and training pipeline files ready.

Mythomania answered 16/4, 2023 at 13:52 Comment(6)
Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.Mainz
I'm assuming you are asking about one of the Tensorflow requirements, you might need to install some software to get it working.Crosier
No, I need to solve the error. Althought tensorRT is installed. 2023-04-18 10:43:29.342280: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT Traceback (most recent call last): File "/content/gdrive/MyDrive/TensorFlow/models/research/object_detection/builders/model_builder_tf2_test.py", line 24, in <module>Mythomania
I am facing the same problem, have you solved it @Ali?Import
Has anyone had this problem on AWS?Roid
I faced the same problem today, then I used this trick to get out: 1、pip/pip3 install tensorrt 2、put "import tensorrt" into your .py file where tensorflow is used. Yes, even if you don't use it in your code, import it. Then you will still get the warning: Could not find TensorRT, but now gpu is used! (if it doesn't work, try to import tensorrt before tensorflow) Don't ask me why it works, I don't know either, I saw it from a Chinese web page: blog.csdn.net/miles2007/article/details/132561059. (PS: I'm using keras 3.1.1, and tensorflow 2.16.1)Hertel
L
28

Try to install pip install tensorrt.

Perhaps you need to read this> How do I install Python packages in Google's Colab?

And check if a GPU is allocated with google colab.

Lugsail answered 17/4, 2023 at 15:5 Comment(9)
Thank you for the answer, now I have one more thing to experiment with rather than being completely lost haha, but sadly I still have the same error. Runtime is set on GPU T4. 2023-04-18 10:43:29.342280:tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT Traceback (most recent call last): File "/content/gdrive/MyDrive/TensorFlow/models/research/object_detection/builders/model_builder_tf2_test.py", line 24, in <module>Mythomania
check the tensorflow version and the tensor rt version.Lugsail
Name: tensorrt Version: 8.6.0 Name: tensorflow Version: 2.12.0 Are they compatible ?Mythomania
try to reinstall tensorflow and play around...Lugsail
I have already tried it few time, thank you.Mythomania
cant you create a google colab environment and share it for us?Lugsail
pip install nvidia-pyindex pip install nvidia-tensorrt or ` pip3 install tensorrt-5.0.2.6-py2.py3-none-any.whl pip3 install pycuda ` pip is usally for python2 and pip3 is python3Lugsail
here is the google colab: colab.research.google.com/drive/…. Thank you i will try it now.Mythomania
from the oontrib errors I would say that you don't have the exact tensorflow version number. Contrib was used in an earlier version and you install the latest tensorflow version.Lugsail

© 2022 - 2024 — McMap. All rights reserved.