Skip to content

A LSTM that can be used as a starting point to train a character-based prediction model

License

Notifications You must be signed in to change notification settings

christian-vorhemus/character-lstm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Character-based LSTM

A LSTM that can be used as a starting point to train a character-based prediction model. This example tries to classify if a first name is female or male based on the dataset in the /data folder.

Prerequisites

  • Make sure that you have a newer version of Python and PIP installed

  • PyTorch is required. Some platforms may require that you have additional packages installed before you can run PyTorch (see the install pages)

  • Open up a terminal and type

    git clone https://github.com/christian-vorhemus/character-lstm.git
    cd character-lstm
    pip install -r requirements.txt
    

Model training

Start the training with

python main.py train

Inference

Check if a name is predicted as male or female with

python main.py anna
anna is probably a female name

About

A LSTM that can be used as a starting point to train a character-based prediction model

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages