Skip to content

Commit a9b0e19

Browse files
committed
Add number of iterations to parameters
1 parent c5b9396 commit a9b0e19

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

train.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def main(model_name):
2222
decoder = LSTMDecoder(hidden_size, lang.n_words, opt.device, attention=opt.attention).to(
2323
opt.device)
2424
lstm2lstm = Seq2Seq(encoder1, decoder, opt.device)
25-
train_iters(lstm2lstm, 500000, pairs, print_every=opt.print_every, model_dir=model_dir,
25+
train_iters(lstm2lstm, opt.iterations, pairs, print_every=opt.print_every, model_dir=model_dir,
2626
lang=lang)
2727

2828

@@ -32,6 +32,7 @@ def main(model_name):
3232
parser.add_argument('--device', default="cpu", help='cpu or cuda')
3333
parser.add_argument('--n_samples', type=int, default=None, help='Number of samples to train on')
3434
parser.add_argument('--print_every', type=int, default=1000, help='Number of samples to train on')
35+
parser.add_argument('--iterations', type=int, default=100, help='Number of samples to train on')
3536

3637
opt = parser.parse_args()
3738
print(opt)

0 commit comments

Comments
 (0)