Skip to content

txdadlab/Simple-LSTM-AI-Model-Pytorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple-LSTM-AI-Model-Pytorch

A simple LSTM-based sentiment classifier built with PyTorch for learning deep learning fundamentals.

What it does

Classifies text as positive or negative sentiment using:

  • Embedding layer for word representations
  • LSTM for sequence processing
  • Fully connected layer with sigmoid activation for binary classification

Requirements

  • Python 3.8+
  • PyTorch (CUDA optional for GPU acceleration)

Setup

python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate
pip install -r requirements.txt

Usage

python main.py

This trains the model on a small toy dataset and prints the loss every 10 epochs.

Project Structure

main.py           # Model definition and training loop
requirements.txt  # Python dependencies

License

MIT

About

LSTM sentiment classifier built with PyTorch — exploring deep learning for NLP

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages