[참고] 경고 문제 해결: Ubuntu 23.04에서 TensorRT를 찾을 수 없습니다.

1. 쿼드로 그래픽 카드가 있는데 한번 사용해 보고 싶은데, 먼저 conda list를 이용하여 tensorflow와 tensorrt를 설치했습니다.

암호:

텐서플로우를 tf로 가져오기

인쇄(tf.test.is_build_with_cuda())

인쇄(tf.config.list_physical_devices('GPU'))

다음과 같은 문제가 발생했습니다.

W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT 경고: TensorRT를 찾을 수 없습니다.

진실

W tensorflow/core/common_runtime/gpu/gpu_device.cc:1960] 일부 GPU 라이브러리를 열 수 없습니다. GPU를 사용하려면 위에서 언급한 누락된 라이브러리가 제대로 설치되었는지 확인하세요. 플랫폼에 필요한 라이브러리를 다운로드하고 설정하는 방법은 https://www.tensorflow.org/install/gpu의 가이드를 따르세요.
GPU 장치 등록을 건너뛰는 중...

[]

2. 문제를 해결하려면 import tensorrt를 trt로 추가하세요. tensorrt는 tensorflow 앞에 있어야 합니다.

암호:

tensorrt를 trt로 가져오기

텐서플로우를 tf로 가져오기

인쇄(tf.test.is_build_with_cuda())

인쇄(tf.config.list_physical_devices('GPU'))

결과:


[PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')]

Je suppose que tu aimes

Origine blog.csdn.net/miles2007/article/details/132561059
conseillé
Classement