我正在尝试将我的PB模型转换为tenrorrt模型,以使其在tx2上工作。
我使用了来自Nvidia论坛的示例代码,并尝试执行它。我知道这是一些与python包相关的问题,但我无法解决它。
我在下面的代码中得到以下错误
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
import tensorrt as trt
from tensorrt.parsers import uffparser
import pycuda.driver a
我通常试图导入TensorFlow python包,但是我得到了以下错误:
以下是上述终端图像的文本:
2020-02-23 19:01:06.163940: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer.so.6'; dlerror: libnvinfer.so.6: cannot open shared object file: No such file or directory
2020-02-2
我使用以下脚本将我的frozen_inference_graph转换为TensorRT优化的a:
import tensorflow as tf
from tensorflow.python.compiler.tensorrt import trt_convert as trt
with tf.Session() as sess:
# First deserialize your frozen graph:
with tf.gfile.GFile('frozen_inference_graph.pb', 'rb') as f:
我尝试使用GPU与Tensorflow,所以我安装了CUDA10.1,CURN7.6,TensorRT 6和Tensorflow-GPU2.1.0。但是当我导入tensorflow来检查它是否能检测到gpu时。它给出了以下错误
>>> import tensorflow as tf
2020-04-22 14:44:14.473830: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer.so.6';
我无法理解整个过程,因为它说我必须替换特定下载的tensorRT、cuda、cuDNN版本的版本。他们说的是什么特别的下载?
下面是第三篇step.Please的全部说明和解释:
将TensorRT-7.x.x.x.Windows10.x86_64.cuda-x.x.cudnnx.x.zip文件解压缩到您选择的位置。取代:
7.x.x.x with the TensorRT version
cuda-x.x with the CUDA version, and
cudnnx.x with the cuDNN version for your particular download.
P.S:
我训练了一个用于目标检测的tensorflow模型,输入作为占位符,维度为1,None,None,3,因为我的训练图像具有不同的大小。然后我将冻结的图(.pb文件)转换为tensorRT图,以便更快地推断,但tensorRT给了我一个警告,即输入张量具有未知的非批处理维度,因此节点将回落到TF。错误消息为: 2019-05-22 08:59:56.628216: W tensorflow/contrib/tensorrt/convert/convert_nodes.cc:3710] Validation failed for TensorRTInputPH_0 and input slot
我试图通过遵循来安装Tensorflow对象检测API。当我结束时,在尝试python object_detection/builders/model_builder_tf2_test.py命令时,我得到了以下错误:
Traceback (most recent call last):
File "object_detection/builders/model_builder_tf2_test.py", line 25, in <module>
from object_detection.builders import model_builder
F
当我试图在服务器上加载Tensorflow联合库时,我得到了以下错误。我使用的是tensorflow_federated版本0.13.1 我在服务器上的Cuda版本是10.2。Cudnn库的版本高于7.6。 被询问的"libnvinfer.so.6"是什么? 2020-03-28 17:26:18.357394: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer.so.6'; dlerror: li
我的项目使用多个Keras模型。这些模型可以有不同批次大小的输入,从1到24不等。我决定使用TRT优化这些模型。
我尝试了两种转换方法:
from tensorflow.python.compiler.tensorrt import trt_convert as trt
第一种方法转换模型,但不为模型创建TensorRT引擎:
conversion_params = trt.DEFAULT_TRT_CONVERSION_PARAMS._replace(
precision_mode=trt.TrtPrecisionMode.FP32)
converter = t
我有两个GPU。我的程序使用TensorRT和Tensorflow。 当我只运行TensorRT部件时,它是正常的。当我与Tensorflow部分一起运行时,我会出现如下错误 [TensorRT] ERROR: engine.cpp (370) - Cuda Error in ~ExecutionContext: 77 (an illegal memory access was encountered)
terminate called after throwing an instance of 'nvinfer1::CudaError'
what(): std::ex
我已经安装了tensorrt 3.0.4,但是当我尝试使用tensorrt 3.0.4安装tensorflow时,我得到了以下结果:
uff 0.2.0 requires argparse>=1.4.0, which is not installed.
tensorrt 3.0.4 requires argparse>=1.4.0, which is not installed.
但奇怪的是,pip show argparse会产生以下输出:
Name: argparse
Version: 1.4.0
Summary: Python command-line parsing lib
我尝试在CMD上运行python。我在我的python文件中导入了tensorflow.contrib。 import tensorflow.contrib.tensorrt as trt 使用此命令在anaconda上运行时。 python run_webcam.py --camera yoga.mp4 它显示错误: File "run_webcam.py", line 8, in <module>
from tf_pose.estimator import TfPoseEstimator
File "D:\work\pose estim