tensorrt icon indicating copy to clipboard operation
tensorrt copied to clipboard

How to convert blinear lstm model into tftrt

Open Csedge opened this issue 5 years ago • 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.

Csedge avatar Mar 03 '20 02:03 Csedge

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 avatar Mar 03 '20 10:03 tfeher

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

agrija9 avatar May 25 '22 17:05 agrija9

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.

tfeher avatar May 25 '22 18:05 tfeher

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.

agrija9 avatar May 25 '22 22:05 agrija9

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

tfeher avatar May 26 '22 07:05 tfeher