Related Dependencies: keras-js, imdb_bidirectional_lstm.bin(trained model, located in public folder), imdb_dataset_word_index_top20000.json
Problem: The model.predict() function in keras-js always output the same result, regardless what the the actual input is, the output is always 50% after deployment.
It works fine on my machine, I’m using Mac OS. But if we deployed it to Linux server, the problem occurred. We can load all dependencies in Linux server, no error messages, but the prediction results are totally different from that from local machine even we used completely same code. The prediction results in deployed version are always 50%, which is not valid.
Problem Statment:
Goal: Use keras-js (https://github.com/transcranial/keras-js) to do Sentiment Analysis for input summary(NLP).
Developing environment: React 16.6.3
Related Dependencies: keras-js, imdb_bidirectional_lstm.bin(trained model, located in public folder), imdb_dataset_word_index_top20000.json
Problem: The model.predict() function in keras-js always output the same result, regardless what the the actual input is, the output is always 50% after deployment.
It works fine on my machine, I’m using Mac OS. But if we deployed it to Linux server, the problem occurred. We can load all dependencies in Linux server, no error messages, but the prediction results are totally different from that from local machine even we used completely same code. The prediction results in deployed version are always 50%, which is not valid.