Skip to content

Commit

Permalink
training steps
Browse files Browse the repository at this point in the history
  • Loading branch information
jcyk committed Mar 17, 2020
1 parent c9e7923 commit a13dba0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The instructions for AMR-to-Text Generation are given in the [generator_data](./

---

**Step 3-6 should be conducted in the `generator` folder for AMR-to-Text Generation, and the `translator` folder for Syntax-based Machine Translation respectively.**
**Step 3-6 should be conducted in the `generator` folder for AMR-to-Text Generation, and the `translator` folder for Syntax-based Machine Translation respectively.** The default settings in this repo should reproduce the results in our paper.

## 3. Vocab & Data Preparation

Expand Down
4 changes: 2 additions & 2 deletions translator/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def parse_config():
parser.add_argument('--unk_rate', type=float)

# IO
parser.add_argument('--epochs', type=int)
parser.add_argument('--total_train_steps', type=int)
parser.add_argument('--train_data', type=str)
parser.add_argument('--dev_data', type=str)
parser.add_argument('--train_batch_size', type=int)
Expand Down Expand Up @@ -148,7 +148,7 @@ def main(args, local_rank):

model.train()
epoch = 0
while True:
while batches_acm < args.total_train_steps:
batch = queue.get()
if isinstance(batch, str):
epoch += 1
Expand Down
2 changes: 1 addition & 1 deletion translator/train.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ python3 train.py --token_vocab ${dataset}/token_vocab\
--inference_layers 3\
--dropout 0.2\
--unk_rate 0.33\
--epochs 1000\
--total_train_steps 55555\
--train_batch_size 88888\
--dev_batch_size 44444 \
--lr 1e-3 \
Expand Down

0 comments on commit a13dba0

Please sign in to comment.