From fd639e5be31f83447c37cf79023fd98bac29f86c Mon Sep 17 00:00:00 2001 From: Lysandre Date: Mon, 10 Feb 2020 11:25:56 -0500 Subject: [PATCH] Correct quickstart example when using the past --- docs/source/quickstart.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/quickstart.md b/docs/source/quickstart.md index cdcc3b6bb0..438f78ebcf 100644 --- a/docs/source/quickstart.md +++ b/docs/source/quickstart.md @@ -209,7 +209,7 @@ past = None for i in range(100): print(i) output, past = model(context, past=past) - token = torch.argmax(output[0, :]) + token = torch.argmax(output[..., -1, :]) generated += [token.tolist()] context = token.unsqueeze(0)