프로젝트
GitHub에서 보기
tunz/transformer-pytorch
소개
PyTorch로 구현한 Transformer입니다.
AI 및 머신러닝측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalTransformer
This is a pytorch implementation of the Transformer model like tensorflow/tensor2tensor.
Prerequisite
I tested it with PyTorch 1.0.0 and Python 3.6.8.
It's using SpaCy to tokenize languages for wmt32k
dataset. So, if you want to run wmt32k problem which is a de/en translation
dataset, you should download language models first with the following command.
$ pip install spacy
$ python -m spacy download en
$ python -m spacy download de
Usage
- Train a model.
$ python train.py --problem wmt32k --output_dir ./output --data_dir ./wmt32k_data
or
$ python train.py --problem lm1b --output_dir ./output --data_dir ./lm1b_data
If you want to try fast_transformer, give a model argument after installing
tcop-pytorch.
$ python train.py --problem lm1b --output_dir ./output --data_dir ./lm1b_data --model fast_transformer
- You can translate a single sentence with the trained model.
$ python decoder.py --translate --data_dir ./wmt32k_data --model_dir ./output/last/models
관련 프로젝트 살펴보기
불러오는 중…