File: run_script.sh

package info (click to toggle)
pytorch-text 0.14.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 11,560 kB
  • sloc: python: 14,197; cpp: 2,404; sh: 214; makefile: 20
file content (12 lines) | stat: -rwxr-xr-x 546 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
if [ ! -d ".data" ]; then
    mkdir .data
fi

python train.py AG_NEWS --device cpu --save-model-path  model.i --dictionary vocab.i
cut -f 2- -d "," .data/AG_NEWS/test.csv | python predict.py  model.i  vocab.i > predict_script.o

# To train using pre-trained sentencepiece tokenizer
# python train.py AG_NEWS --device cpu --save-model-path  model.i --dictionary vocab.i --use-sp-tokenizer True

# To run spm with YelpReviewFull
# python train.py YelpReviewFull --device cuda --save-model-path  model.i --dictionary vocab.i --use-sp-tokenizer True