Shikhar-S / EvolvedTransformer

Contains pytorch implementation of Transformer and EvolvedTransformer architectures. WIP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Transformer Encoder block implementation in PyTorch

Pytorch implementations of:

for text classification on AG_NEWS dataset.

TransformerModels

Prerequisites

  • numpy==1.17.2
  • torch==1.2.0
  • torchtext==0.5.0
  • tqdm==4.44.1
  • spacy==2.2.4
  • Python 3.6+

Usage

Install prerequisites with:

pip3 install -r requirements.txt

python3 -m spacy download en

To run Encoder for text classification on AG_NEWS dataset:

python3 main.py 

python3 main.py --evolved true 

More configurations can be found here.

Reference

Author

Shikhar / @Shikhar

About

Contains pytorch implementation of Transformer and EvolvedTransformer architectures. WIP


Languages

Language:Jupyter Notebook 62.4%Language:Python 37.6%