You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been looking through the documentation how to implement the prediction model in KerasJS but have been unsuccessful finding the correct context. I understand there is a boilerplate code available in js which just states that a float32 is used along with the callback and model.predict etc, I was able to use the encoder to convert the model h5 to the *bin required but in terms of tokenizing the text I do not see anything currently that is in the documents with KerasJS.
i've been successful using Python and the normal approach with Keras but am struggling to find concrete examples to do what is required for my project with KerasJS.
I have done the following with the Python for classification:
1. Create Tokenizer
2. Open a dictionary *json file containing the top 3000 words in
3. Implement keras.text_to_word_sequence (myText)
4. Make sure the words are registered in the dictionary
5. Tokenizer.sequences_to_matrix(input), binary
6. predict and receive the appropriate output
Can someone kindly explain to me or point me to the correct docs that I can follow to achieve this?
The text was updated successfully, but these errors were encountered:
According to my understanding of keras.js documentation, I think they don't support Tokenizer. My solution is finishing all the preprocessing work in a flask app and send the ready-to-use sequence back for prediction. Although it's been a while, I hope this can help.
I have been looking through the documentation how to implement the prediction model in KerasJS but have been unsuccessful finding the correct context. I understand there is a boilerplate code available in js which just states that a float32 is used along with the callback and model.predict etc, I was able to use the encoder to convert the model h5 to the *bin required but in terms of tokenizing the text I do not see anything currently that is in the documents with KerasJS.
i've been successful using Python and the normal approach with Keras but am struggling to find concrete examples to do what is required for my project with KerasJS.
I have done the following with the Python for classification:
1. Create Tokenizer
2. Open a dictionary *json file containing the top 3000 words in
3. Implement keras.text_to_word_sequence (myText)
4. Make sure the words are registered in the dictionary
5. Tokenizer.sequences_to_matrix(input), binary
6. predict and receive the appropriate output
Can someone kindly explain to me or point me to the correct docs that I can follow to achieve this?
The text was updated successfully, but these errors were encountered: