Skip to content

Latest commit

 

History

History
38 lines (24 loc) · 1.14 KB

File metadata and controls

38 lines (24 loc) · 1.14 KB

IMDB Sentiment Analysis (Python + C++ with ONNX Runtime)

This project performs sentiment analysis on IMDB movie reviews, using a neural network trained in Python with Keras and deployed in C++ using ONNX Runtime for fast inference.


📌 What This Project Does

  • Trains a simple MLP neural network on the IMDB dataset (binary classification: positive or negative review)
  • Converts the trained model to ONNX format
  • Loads and runs the ONNX model using C++ and ONNX Runtime

🚀 Technologies Used

  • Python (Keras, NumPy, keras2onnx, ONNX)
  • C++ (ONNX Runtime C++ API)
  • IMDB dataset (included in Keras)

📂 Files

File Description
train_and_export.py Python script to train the model and export to ONNX
main.cpp C++ code to load the ONNX model and run inference
imdb_sentiment.onnx Exported model (generated by the Python script)

🛠 How to Use

1. Install Python Requirements

pip install keras keras2onnx onnx numpy