Monday, September 19, 2016

Run textsum TensorFlow model

To run `textsum` TensorFlow model, do as follows:

git clone https://github.com/tensorflow/models.git

mkdir textsum_test
cd textsum_test/
ln -s ../models/textsum/data data
ln -s ../models/textsum/ textsum
touch WORKSPACE

bazel build -c opt textsum/...

bazel-bin/textsum/seq2seq_attention \
  --mode=train \
  --article_key=article \
  --abstract_key=abstract \
  --data_path=data/data \
  --vocab_path=data/vocab \
  --log_root=textsum/log_root \
  --train_dir=textsum/log_root/train

You can change max run steps with `--max_run_steps`.

Reference:
https://github.com/tensorflow/models/tree/master/textsum

No comments:

Post a Comment