Closed dhkim0225 closed 4 years ago
Hi @dhkim0225 ,
Sorry for the delay, I'll start looking into this tomorrow.
Yup, always, thanks a lot !! :)
Hi @dhkim0225 ,
Would it be possible for you to make a similar repro but comparing TensorRT RNNv2 output to TF's cudnnLSTM op (https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/cudnn_rnn/CudnnLSTM), and see if that still has the issue?
@rmccorm4
Sorry for late reply. Finally, I solved a problem. It was because of forget_bias.
I didn't understand following statement in tensorrt documentation.
And it means,
_If you your model learned with forget_bias=1 parameter,
(default param of tf.contrib.rnn.lstmcell)
!! You should add forgetbias 1 !!
like this.
Close Issue, since I solve a problem.
Thanks !!
@rmccorm4
Sorry for late reply. Finally, I solved a problem. It was because of forget_bias.
I didn't understand following statement in tensorrt documentation.
And it means,
_If you your model learned with forget_bias=1 parameter, (default param of tf.contrib.rnn.lstmcell) !! You should add forgetbias 1 !!
like this.
Close Issue, since I solve a problem.
Thanks !!
hi i am also having different outputs for LSTM in keras and tensorrt, to be more precise i am using bi directional LSTM .While keras lstm gives the correct ouput. so according to you i just need to set forget bias to 1 in tensorrt?
Description
Hello, Thanks for developing TensorRT Engine. I saw something strange outputs from RNNv2 layer.
It's really strange. I'm working with TRT python api to convert tf seq2seq model. My sequence_length of rnn is 33. The output shape is (batch_size, 33, 512). The first output [0, 0,:] was the same as the output [0,0 ,:] of tensorflow. However, values started to differ from the next sequence.
The rnn input of INetwork have a same value as the rnn input of tensorflow.
The average errors of 33 time-steps are as follows.
Environment
TensorRT Version: 7.0.0.11 GPU Type: T4 Nvidia Driver Version: 440.33 CUDA Version: 10.2.89 CUDNN Version: 7.6.5 Operating System + Version: Ubuntu 18.04 Python Version (if applicable): 3.6 TensorFlow Version (if applicable): 1.14.0
Relevant Files
TF RNN
INetworkDefinition
In my opinion, the weight conversion seems to be correct since the first time-step output came out correctly.
Any Ideas..?
Happy to see you again Ryan :p