keras2cpp icon indicating copy to clipboard operation
keras2cpp copied to clipboard

LSTM to CPP, who has good method?

Open fengtongtong opened this issue 6 years ago • 3 comments

fengtongtong avatar Apr 30 '18 13:04 fengtongtong

Of relevance: #1

MatthewScholefield avatar Sep 11 '18 07:09 MatthewScholefield

Not sure but maybe numpy keras Backend?

https://github.com/keras-team/keras/blob/master/keras/layers/recurrent.py

https://github.com/keras-team/keras/blob/master/keras/backend/numpy_backend.py

rspadim avatar Feb 04 '19 01:02 rspadim

I have an LSTM model built with Keras framework. This model is for the next word prediction based on the previous text entered by the user. So I have written a function in python which is loading this Keras model and a tokenizer file(for word-sequences) into it and using inbuilt functions like predict_classes and pad_sequences to make next word predictions. I have to convert this function to C++, so can anyone help me out how to use this repo for my use. I tried using Cython but that didn't help as it converts a 52 line code in Python to 4000 line code in C++ which is not convenient. It is inconvenient to debug the 4000 line of code without knowing its relevance.

sidharth1010 avatar May 20 '19 06:05 sidharth1010