Skip to content

MahradMozafari/imdb-sentiment-analysis-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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

About

Sentiment analysis on IMDB reviews using Keras (Python) and inference in C++ using ONNX Runtime.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors