bill-kalog / sent_classification_pytorch

sentence classification models implemented in pytorch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Description

model variants for text classification written in PyTorch. Some of the code structure is based on examples from spro. At the moment the following models are implemented:

  • vanilla RNN with GRU cells class RNN_s
  • vanilla RNN with GRU cells and attention on top class RNN_encoder
  • CNN with attention on top class CNN_encoder
  • a transformer encoder in transformer_models.py

install torchtext

in order to run this code apart from PyTorch you need torchtext too. Get it using:

pip install torchtext

tokenization

if you want to use some more advanced tokenization technique with torchtext do make sure you have spacy installed using:

pip install -U spacy

then download the English models using:

python -m spacy download en

use tensorboard on pytorch

check the tensorboard-pytorch repo. Here are is a blogpost describing some of the functionality.

About

sentence classification models implemented in pytorch


Languages

Language:Python 100.0%