Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find LSTMCell accum_shift and LSTMCell accum_multiplier #2575

Closed
Kullka opened this issue May 16, 2024 · 1 comment
Closed

Find LSTMCell accum_shift and LSTMCell accum_multiplier #2575

Kullka opened this issue May 16, 2024 · 1 comment
Assignees

Comments

@Kullka
Copy link

Kullka commented May 16, 2024

Hello everyone,
I'm trying to implement LSTM network after quantization by TensorFlow Lite to FPGA. But I don't know how to get LSTMCell accum_shift and LSTMCell accum_multiplier. Can anyone help me? Thank you.

3 lines below can be found in https://github.com/tensorflow/tflite-micro/blob/main/tensorflow/lite/kernels/internal/reference/lstm_cell.h_
image

@ddavis-2015 ddavis-2015 self-assigned this May 17, 2024
@ddavis-2015
Copy link
Member

@Kullka

The LstmCell method is only used with the legacy LSTM kernel operator, which TFLM does not support. TFLM supports the UNIDIRECTIONAL_SEQUENCE_LSTM operator, which does not use the LstmCell method. The legacy LSTM operator is still supported in the TensorFlow repository. Any additional questions regarding LSTM should be posted as an issue in that repository.

The accum_shift and accum_multiplier are computed using tflite::QuantizeMultiplier and the code for these values can be found here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants