tensorflow/tensorrt

How to convert blinear lstm model into tftrt

Csedge opened this issue · 5 comments

i have a model that base on the tensorflow. That is a blinear lstm. When I try to frozen the graph according to the tftrt guide line .the data type was convert in wrong . It automatically from tensor to operator. So it convert failed.

TF-TRT currently does not convert the LSTM op (see supported ops).

TensorRT itself supports LSTMs through its RNN layer, but TF-TRT does not convert the TF LSTM into TensorRT LSTM. You could try using TensorRT directly if it is an option for you.

@tfeher do you know if TF-TRT now supports LSTM layers?

No, we still do not have support for LSTM in TF-TRT. Alternative to TF-TRT, you could try if the tf2onnx -> onnx-tensorrt route works for you.

I will try that route then, thanks for your reply!

One more question, have you encountered examples of TensorRT for time series forecasting using LSTM? Or is TensorRT mostly computer vision oriented?

Ps. I am trying to run a trt engine on a Jetson Xavier NX.

No, TensorRT is not only computer vision oriented. We have an RNN code sample which actually shows how to define an LSTM.