tensorrt不支持:tf.unpack,tf.slice,tf.tile,tf.expand_dims,tf.fill,tf.cast,tf.floor_div,tf.range

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了tensorrt不支持:tf.unpack,tf.slice,tf.tile,tf.expand_dims,tf.fill,tf.cast,tf.floor_div,tf.range相关的知识,希望对你有一定的参考价值。

从tensorflow模型转换为uff模型(例如:tf.unpack, tf.slice, tf.tile, tf.expand_dims, tf.fill, tf.cast, tf.floor_div, tf.range)时,对于tensorrt有许多不受支持的操作。有没有一种简单的方法来解决这个问题?当我将转换从pb转换为uff模型时,这是警告:

Warning: No conversion function registered for layer: Unpack yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: Unpack yet.
Warning: No conversion function registered for layer: Unpack yet.
Warning: No conversion function registered for layer: Tile yet.
Warning: No conversion function registered for layer: ExpandDims yet.
Warning: No conversion function registered for layer: Tile yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: ExpandDims yet.
Warning: No conversion function registered for layer: Fill yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: ExpandDims yet.
Warning: No conversion function registered for layer: Fill yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: Cast yet.
Warning: No conversion function registered for layer: FloorDiv yet.
Warning: No conversion function registered for layer: Tile yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: ExpandDims yet.
Warning: No conversion function registered for layer: Fill yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: ExpandDims yet.
Warning: No conversion function registered for layer: Fill yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: Cast yet.
Warning: No conversion function registered for layer: FloorDiv yet.
Warning: No conversion function registered for layer: Tile yet.
Warning: No conversion function registered for layer: Tile yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: ExpandDims yet.
Warning: No conversion function registered for layer: Fill yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: ExpandDims yet.
Warning: No conversion function registered for layer: Fill yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: Cast yet.
Warning: No conversion function registered for layer: Cast yet.
Warning: No conversion function registered for layer: Range yet.
Warning: No conversion function registered for layer: Tile yet.
Warning: No conversion function registered for layer: Tile yet.
Warning: No conversion function registered for layer: Cast yet.
Warning: No conversion function registered for layer: Cast yet.
Warning: No conversion function registered for layer: Range yet.
Warning: No conversion function registered for layer: Tile yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: ExpandDims yet.
Warning: No conversion function registered for layer: Fill yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: ExpandDims yet.
Warning: No conversion function registered for layer: Fill yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: Cast yet.
Warning: No conversion function registered for layer: Tile yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: ExpandDims yet.
Warning: No conversion function registered for layer: Fill yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: ExpandDims yet.
Warning: No conversion function registered for layer: Fill yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: Cast yet.
Warning: No conversion function registered for layer: Tile yet.
Warning: No conversion function registered for layer: Tile yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: ExpandDims yet.
Warning: No conversion function registered for layer: Fill yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: ExpandDims yet.
Warning: No conversion function registered for layer: Fill yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: Cast yet.
Warning: No conversion function registered for layer: Cast yet.
Warning: No conversion function registered for layer: Range yet.
Warning: No conversion function registered for layer: Tile yet.
Warning: No conversion function registered for layer: Tile yet.
Warning: No conversion function registered for layer: Cast yet.
Warning: No conversion function registered for layer: Cast yet.
Warning: No conversion function registered for layer: Range yet.
Warning: No conversion function registered for layer: Tile yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: ExpandDims yet.
Warning: No conversion function registered for layer: Fill yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: ExpandDims yet.
Warning: No conversion function registered for layer: Fill yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: Cast yet.
Warning: No conversion function registered for layer: Tile yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: ExpandDims yet.
Warning: No conversion function registered for layer: Fill yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: ExpandDims yet.
Warning: No conversion function registered for layer: Fill yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: Cast yet.
Warning: No conversion function registered for layer: Tile yet.
Warning: No conversion function registered for layer: Tile yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: ExpandDims yet.
Warning: No conversion function registered for layer: Fill yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: ExpandDims yet.
Warning: No conversion function registered for layer: Fill yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: Cast yet.
Warning: No conversion function registered for layer: Cast yet.
Warning: No conversion function registered for layer: Range yet.
Warning: No conversion function registered for layer: Tile yet.
Warning: No conversion function registered for layer: Tile yet.
Warning: No conversion function registered for layer: Cast yet.
Warning: No conversion function registered for layer: Cast yet.
Warning: No conversion function registered for layer: Range yet.
Warning: No conversion function registered for layer: Tile yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: ExpandDims yet.
Warning: No conversion function registered for layer: Fill yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: ExpandDims yet.
Warning: No conversion function registered for layer: Fill yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: Cast yet.
Warning: No conversion function registered for layer: Tile yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: ExpandDims yet.
Warning: No conversion function registered for layer: Fill yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: ExpandDims yet.
Warning: No conversion function registered for layer: Fill yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: Cast yet.
Warning: No conversion function registered for layer: Tile yet.
Warning: No conversion function registered for layer: Tile yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: ExpandDims yet.
Warning: No conversion function registered for layer: Fill yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: ExpandDims yet.
Warning: No conversion function registered for layer: Fill yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: Cast yet.
Warning: No conversion function registered for layer: Cast yet.
Warning: No conversion function registered for layer: Range yet.
Warning: No conversion function registered for layer: Tile yet.
Warning: No conversion function registered for layer: Tile yet.
Warning: No conversion function registered for layer: Cast yet.
Warning: No conversion function registered for layer: Cast yet.
Warning: No conversion function registered for layer: Range yet.
Warning: No conversion function registered for layer: Tile yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: ExpandDims yet.
Warning: No conversion function registered for layer: Fill yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: ExpandDims yet.
Warning: No conversion function registered for layer: Fill yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: Cast yet.
Warning: No conversion function registered for layer: Tile yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: ExpandDims yet.
Warning: No conversion function registered for layer: Fill yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: ExpandDims yet.
Warning: No conversion function registered for layer: Fill yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: Cast yet.
Warning: No conversion function registered for layer: Tile yet.
Warning: No conversion function registered for layer: Tile yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: ExpandDims yet.
Warning: No conversion function registered for layer: Fill yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: ExpandDims yet.
Warning: No conversion function registered for layer: Fill yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: Cast yet.
Warning: No conversion function registered for layer: Cast yet.
Warning: No conversion function registered for layer: Range yet.
Warning: No conversion function registered for layer: Tile yet.
Warning: No conversion function registered for layer: Tile yet.
Warning: No conversion function registered for layer: Cast yet.
Warning: No conversion function registered for layer: Cast yet.
Warning: No conversion function registered for layer: Range yet.
Warning: No conversion function registered for layer: Tile yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: ExpandDims yet.
Warning: No conversion function registered for layer: Fill yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: ExpandDims yet.
Warning: No conversion function registered for layer: Fill yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: Cast yet.
Warning: No conversion function registered for layer: Tile yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: ExpandDims yet.
Warning: No conversion function registered for layer: Fill yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: ExpandDims yet.
Warning: No conversion function registered for layer: Fill yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: Cast yet.
Warning: No conversion function registered for layer: Tile yet.
Warning: No conversion function registered for layer: Tile yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: ExpandDims yet.
Warning: No conversion function registered for layer: Fill yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: ExpandDims yet.
Warning: No conversion function registered for layer: Fill yet.
Warning: No conversion function registered for layer: Slice yet.
Warning: No conversion function registered for layer: Cast yet.
Warning: No conversion function registered for layer: Cast yet.
Warning: No conversion function registered for layer: Range yet.
Warning: No conversion function registered for layer: Tile yet.
Warning: No conversion function registered for layer: Tile yet.
Warning: No conversion function registered for layer: Cast yet.
Warning: No conversion function registered for layer: Cast yet.
Warning: No conversion function registered for layer: Range yet.
Warning: No conversion function registered for layer: Unpack yet.
答案

您可以尝试使用TF-TRT,它只允许转换TRT支持的图形部分,并将其余部分保留在TF中。你可以在这里找到一些例子:https://github.com/tensorflow/tensorrt

以上是关于tensorrt不支持:tf.unpack,tf.slice,tf.tile,tf.expand_dims,tf.fill,tf.cast,tf.floor_div,tf.range的主要内容,如果未能解决你的问题,请参考以下文章

TF-TRT 与 UFF-TensorRT

Yolov3 到 Tensorrt:tf-keras Lambda 层的自定义插件

tf1.7+cuda9.0+cudnn7.0.3+tensorRT3.0.4编译

tf1.7+cuda9.0+cudnn7.0.3+tensorRT3.0.4编译

极智AI | 初识 TensorRT Plugin

极智AI | TensorRT Parser 构建模型推理方法